Forum Discussion

Joshy_381532's avatar
Joshy_381532
Icon for Nimbostratus rankNimbostratus
Jan 21, 2019

Direct traffic to maintenance page based on API call to external system

I would like to setup traffic redirection based on the response of an API call to an external application -

 

a) If the API returns "true", the traffic will need to be directed to a static maintenance page,

 

b) If the API returns "false", the traffic will need to be directed to the application pool, or

 

c) If the API call fails for some reason (e.g. the external app is down), the traffic should continue to the destination as per previous stable state; i.e. to either a or b as the case was.

 

I understand an option to achieve cases a and b will be by setting up a separate pool and having a Health Monitor that calls the API, and the iRule on the VIP checking the LB::status of that pool and direct the traffic accordingly. But the challenge I'm facing is how to achieve the case c above.

 

Any suggestions? Thanks.