Forum Discussion
Fallback to same server different port
We would like (for complicated reasons) to run 2 instances of the same service on the same server but on 2 different ports. Visitors vists www.mysite.com and F5 should reverse proxy server:8080 unless the service is unreachable in which case it should fallback to server:8081.
Load balancing doesn't help us as we don't want it to share the load between these endpoints, just failover to port 8081 if 8080 is stopped.
AFAIK we need to define 2 pools and then write an iRule which says: if 8080 not available then go to 8081.
We want this to be transparent to the client - no HTTP redirect.
Little help with the iRule code?
5 Replies
- JPV_131616
Cirrus
you can do it without an irule if you just have 2 servers on different ports.
e.g. ip:8080, ip:8081 in the same pool.
- create a monitor to monitor the app.
- Use priority group, and assign the primary server a higher priority, e.g. 99, set the priority to 1 for the backup.
give it a try and see if it works as you require.
cheers
- Marc_13733
Nimbostratus
That would work 99% of the time I guess. The thing is: we've put a sniffer (Fiddler) on :8080 (proxying to 8081) and want it to log 100% of requests. Just if it crashes (which it did yesterday) should F5 fallback to 8081. With the 99% solution we'd miss logging 1% of the traffic which we would like to avoid.
- Kevin_Stewart
Employee
I believe JPV's idea is the way to go, and really boils down to the monitor you use. The monitor will determine if an application is available, and priority group activation will only send to the lower priority devices if the higher ones are marked down.
we've put a sniffer (Fiddler) on :8080 (proxying to 8081)
Not sure I understand this part.
- JPV_131616
Cirrus
See this link and search for the section on priority based member activation.
http://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm-concepts-11-4-0/5.html?sr=31994673
Basically all traffic would go to the member with higher priority unless it goes down.
thx
- Marc_13733
Nimbostratus
Thanks again. According to that link "members that are assigned a high priority receive all traffic until the load reaches a certain level or some number of members in the group become unavailable". If I knew what "a certain level" meant... but I guess the "Priority group activation" applies - if set to 0 then traffic only fails over to lower (1) prio groups when *all* servers in high (99) prio groups are unavailable.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com