We are currently checking the health of the application by opening a socket connection. This might not be feasible approach for all the servers. Sometimes, even thought the port is open, server might not be ready to process the request. In that case we should check the status of the server depending on the server type. If the server supports http, then we can check the status using HTTP HEAD request. This would give us more accurate status rather than just checking whether the port is open.