Forum Discussion

michaelwong_139's avatar
michaelwong_139
Icon for Nimbostratus rankNimbostratus
Jul 24, 2014

help me write a irule about persist with uri

real_server_A:192.168.1.100:9292 real_server_B:192.168.1.200:9292

 

when the client first visit f5, the f5 will load balance with Round Robin.Then,the connection will be persisted on the same real server(such as real server A) next time. when the real_server_A unavailable, the client will be load balance to real_server_B. When the real_server_A become available,the client will be load balance to real_server_A again.

 

Plz help me ! WAITING FOR U !!!

 

3 Replies

  • A couple of questions: 1) What is the protocol being used, and what application is it? 2) What's the reason for needing to re-balance back to the first server if it comes back?
  • Hi, @MiLK_MaN 1.the protocol is HTTP,and the application is their development. The staff visit the application with HTTP,and the URI include their own ID number (the string is "loginid=xxxxxxxx"). 2.their Ngix can satisfy this re-balance back to the first server if it comes back, so the leader also require f5 to satisfy it. thanks
  • In the pool configuration, set "Action on Service Down" to "reselect", which will cause the BIG-IP to do another pool selection against available members.

     

    I'm going to advise against having the traffic go back to the original server just for the sake of it. Sure, technically this can be achieved, but it's actually not that easy and requires you to first check if pool member A is active, and if so, unbind the connection to pool member B and then re-bind with pool member A. There's no real easy way to track that the pool member that was originally selected was member A without creating a table entry, and then checking it on each request.... all in all its technically possible but horribly inefficient and not really worth it.