Forum Discussion

adeelshahzad's avatar
Icon for Nimbostratus rankNimbostratus
Jun 04, 2024

iRule to show banner while application maintenace

Dear Experts,


Hope you are good, I am looking for an irule to display a banner while accessing the website by the user. Something like "website is under maintenance" I hope someone already used this before. Could you please share that irule. 




2 Replies

  • You can use HTTP::respond to reply to a client request directly without using a pool member. Creating a rule based on the second example in the link below should meet your needs.


  • How in depth do you want to go with this? You can setup the iRule to monitor the number of active pool members, and if it is ZERO, it can HTTP respond with a custom web page hosted on the F5 completely --- index pages, images, css, etc. You would need to use iFiles. The following should be enough to set you on the correct path: Solution: Create a F5 Maintenance Page with Image (iRule/iFile) - A step by step procedure. | DevCentral.

    Keep in mind you COULD go as fancy as a 'banner' with the backends still responding, but under maintenance. For something as complicated like that, you would need to work with your web site development team and perhaps have the maintenance banner as a normally loaded element but with a z-index that hides it, or even a visibility flag set to false. You could then have the F5 BIG-IP under a certain condition change the flag via the HTTP stream profile or something. Odds are you are looking at the first option ;)