We have maintenance page hosted in AWS cloud Front.
which approach is better?
DNS Change – Temporarily point our domain (via CNAME) to CloudFront by adjusting the TTL to 2 minutes.
F5 Configuration – Issue a 302 redirect from F5 to CloudFront or forward (reverse proxy) traffic from F5 to CloudFront by modifying the Host header. This keeps the browser on our domain and returns a 200 OK.
Main concerns :
Avoiding browser/edge caching issues (we can clear Akamai cache if needed).
Ensuring a quick rollback after maintenance.
Which approach would be best? Could you advise on the correct implementation?
If the maintenance page doesn’t really send you anywhere I would recommend setting up an iRule that provides the maintenance page to the client depending on the pool status.
You can use the BIG-IP system to respond (with a maintenance page) if the virtual server resources (pool or pool members) are unavailable.
When the BIG-IP system receives a request for a virtual server that does not have available resources (for example, the pool is marked down with no available pool members) you can configure an iRule to send an HTTP response, such as a maintenance page, to the client. To do so, perform the following procedure:
Thanks for your response. I’ve gone through the document and it looks that the status code returned is 200. Will this response be cached by the browser or by any edge router/CDN, which can cause the “maintenance” message to persist even after the site comes back up.