Forum Discussion

Doris_Franse_13's avatar
Doris_Franse_13
Icon for Nimbostratus rankNimbostratus
Sep 11, 2013

F5 - Closing And Opening Ports Solution

 

I have F5 with 4 web servers sitting in front of it and 6 retrieval servers sitting behind it. (Web <--> f5 <--> retrieval server) When web traffic from a WEB-A (web server A) connects to F5, F5 connects to a specific port on RET-A (retrieval server A) to login and gets a license from retrieval server. We have a windows service app that monitors licenses left and if none are left it closes the login port on RET-A so F5 cannot access it. When F5 comes in the next time it finds out that RET-A login port is closed so it redirects traffic to RET-B and so forth. Now, when licenses are available again in RET-A, I want F5 to be aware and put RET-A back into queue of available servers.

 

My question is: how can I alert F5 that RET-A is now available and can service more requests?

 

 

3 Replies

  • Two options off the top of my head:

     

    1. Is there a service instance that the F5 can poll to get status of the retrieval server? If so you'd could simply apply an external monitor script to the pool. The F5 would be "pulling" the member status information.

       

    2. Do you have the ability to launch processes from the retrieval servers on an event (when no licenses are left)? If so you can use an iControl script to disable/enable the pool members. The service would be "pushing" the member status information.

       

  • Answering inline:

     

    1. We can create a service that will be enabled and disabled that runs in retrieval server and maybe F5 can connect on another port to check the status of that service in the retrieval server OR a service can connect from retrieval server to the F5 and enable the a service that will run in F5?

    As long as there's something that the F5 can poll that will return the status of the server, you can use a monitor, and the port can be different than the actual pool members. I mentioned an external script, but depending on the complexity of the service you might be able to use the built-in monitors. Is the license service HTTP-based? If so it'd probably be easiest to just allow the F5 to do an HTTP GET or POST to a URL that provides that status. If you're actually enabling or disabling a Windows service (that's listening on a specific port), then you could probably use a TCP monitor.

     

    1. Yes The second proposal might be the solutions since I can write an IControl script in C. And Please elaborate on that.

    There are MANY examples of doing this in the iControl wiki, so I won't list anything here. The idea though is to create an iControl (via C, Python, PowerShell, etc.) that will launch on your defined event and either disable a pool member or enable it.