0 votes
1 view
in AWS by (19.2k points)
edited by

Here is the thing:

  1. We've implemented a C++ RESTful API Server, with built-in HTTP parser and no standard HTTP server like Apache or anything of the kind
  2. It has been in use for several months in Amazon structure, using both plain and SSL communications, and no problems have been identified, related to Amazon infra-structure
  3. We are deploying our first backend using Amazon ELB
  4. Amazon ELB has a customizable health check system but also as an automatic one, as stated here - https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/ts-elb-healthcheck.html 
  5. We've found no documentation of what data is sent by the health check system
  6. The backend simple hangs on the socket read instruction and, eventually, the connection is closed

I'm not looking for a solution for the problem since the backend is not based on a standard web server, just if someone knows what kind of message is being sent by the ELB health check system, since we've found no documentation about this, anywhere.

1 Answer

0 votes
by (44.6k points)

I think you are referring to health check configuration. You can see these links

  1. AWS Management Console - https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-healthchecks.html 
  2. Via the API - https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_ConfigureHealthCheck.html 
     

The solution:

Assuming your RESTful API Server, with inbuilt HTTP parser is meant to serve HTTP only indeed, you'll need to handle 2 health checks:

  • The first one you configured yourself as an HTTP:port;/;PathToPing - you'll receive an HTTP GET request and must answer with 200 OK within the specified timeout period to be considered healthy.
  • The second one configured automatically by the service - it will open a TCP connection on the HTTP port configured above, won't send any data, and then closes the connection after the health check is completed.
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...