Domanda

I need to track whether the application is running at webserver or NOT. For this i code one java application which sends the http request to server and track whether application is running or NOT based on response. Now i have load balancer which is balancing load among 3 server running same application and i am sending the same request , then how to find out the ip of the machine from which i am getting the response so that i can track whether application is running on that server or not. My application will run in local network where all server are running. Hopefully i am able to explain my question.

È stato utile?

Soluzione

If the code performing the check is running in the same local network than the application servers, I suggest you completely by pass the load-balancer for this check and perform your http request directly to the 3 applications servers.

Usually you have two kind of checks :

  • one check made in the local production networks (before any loadbalancer, proxy,etc.)
  • another one made the Internet to make sure actual users can access the application : this is more an end-to-end check and it will also warns you if your connection, load balancer or any other element is down.

If you really cannot make request to the real application servers, I'm afraid it will generally not be possible : if made properly, load-balancing is normally completely transparent for the http client. You might want to look at this answer on security stackexchange for more details.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top