Forum Discussion

Arie_90212's avatar
Arie_90212
Icon for Nimbostratus rankNimbostratus
Mar 17, 2015

AAM stand-in cache - trigger on slow/no reply from origin?

The stand-in cache works great when the origin returns a predefined HTTP response code (e.g. 500).

 

However, it looks like there's no way to configure the AAM to use the stand-in cache if there is no response at all (within a time limit).

 

Any way to accomplish this?

 

1 Reply

  • Arie's avatar
    Arie
    Icon for Altostratus rankAltostratus

    Just thought of an ugly workaround for this. The biggest drawback is that the timeout would be equal to the monitor timeout (usually 16 seconds). However, it would eventually start using the stand-in cache which is better than what AAM offers out of the box for very slow replies. It also remedies the problem of having a sorry-page to preventing AAM from using stand-in cache. Of course it would necessitate removing (or adding intelligence to) a sorry page iRule.

     

    1. Create a dummy VIP. No pool.
    2. Assign an iRule that will always return a 500 (Server Error) to a request.
    3. Assign this dummy VIP to the pool for the VIP that has the AAM-profile assigned to it.
    4. Break inheritance for the monitors on for this pool member. Assign a simple monitor (e.g. ICMP).
    5. Create priority groups in the pool. The dummy VIP pool member should be in the second priority group.

    This will ensure that AAM encounters a 500 if the monitors on the other pool members time out (usually in 16 seconds).

     

    Disclaimer: this is an ugly workaround. Hoping that F5 will add time-outs and no-reply as a trigger for stand-in cache.