Forum Discussion

b_kodan_313047's avatar
b_kodan_313047
Icon for Nimbostratus rankNimbostratus
Mar 08, 2017

tcp/http monitor

What is the differnece between tcp(applied on http pool) and http monitor. I thinks both cases, threway handshake is happening and monitor checks whether or not port 80 is opened. What is the usecase for using http monitor.

 

  • http monitor is applying a simple GET that you have the ability to elaborate on. tcp:80 is only determining of the binary on the server is responding; while http monitor is inspecting some type of content (GET /r/n).

     

    Unless you're constrained to a legacy setup, I personally will never use ICMP gateway, or TCP monitors unless forced to. Application Delivery is all about sustaining and maintaining health to your applications, and part of the user experience could be affected by liberal health monitors. IE a user browses your nginx application. The Application is experiencing a 503 service interruption, yet your TCP 80 health check has the server green because the binary nginx is ok... but the database is down.

     

  • Hi b.kodan,

     

    The TCP monitor just tries to establish a TCP connection to the individual pool members. If the 3-way handshake completes the monitor will be marked as "successful".

     

    The HTTP monitor will also establish a TCP connection to the individual pool members. And right after send an additinall HTTP-Request over TCP-connection. If the monitor receives a HTTP-Response (whatever the response will look like) the the monitor will be marked as "successful".

     

    Note: The recommended approach is to use a tailordered HTTP-Monitor for HTTP-Pools. on this way you can define the exact HTTP-Request matching your application logic and the expected HTTP-Response from your "healthy" application (e.g. 200 OK, certain HTML-contents, etc.).

     

    Cheers, Kai