Everyone,
Moving from NetScaler to BigIP, LTM, and F5 and am “drinking from the firehose” trying to learn everything I can before my company goes live. I could use some suggestions here so here it goes:
Scenario:
My company has a blue/green deployment model. I’m looking to use the LTM to direct traffic to the application to the proper pools/nodes based on a STATIC variable set with a RULE_INIT event. All developers have to do in their deployment pipeline is send an API call to BigIP to change the variable to blue/green as needed. We have opted for this design because if changes need to be made within F5 for any reason (object renaming, partition changing, etc.), developers don’t have to change their pipelines to accommodate. The application has an iRule which then reads the variable value and directs to proper pool using SWITCH. Simple.
Challenge:
Because the iRule is technically looking at two pools in its logic, when I disable the nodes in the “active” pool, if the “inactive” pool is still up, LTM leaves the Virtual Server as up/green, even though traffic cannot reach the disabled “active” nodes on the server side (should register as “grey” in my test).
Solution(?):
Rather than recreate the monitoring logic in the iRule for the site (and multiple other future sites), I would think the easiest way to leverage existing LTM architecture would be to change the logic of the iRule to change the Default Pool of the application when the STATIC variable changes. Is it possible to do this within an iRule? Every time I search for this option, I only get hits on how to redirect to different pools.
Or perhaps there is another way to accomplish this that I am not aware of? Any input would be appreciated. Thanks!