tputkonen
tputkonen

Reputation: 5739

Socket.io application running on Elastic Beanstalk - how to handle healthchecks?

I have a very simple node.js application which creates a socket.io server on port 8081 and replies to simple, proprietary requests.

It's running fine on Elastic Beanstalk with Application Load Balancer. However, Elastic Beanstalk thinks there is a problem with the app as the healthchecks fail.

What would be an easy way to make health checker happy?

Upvotes: 1

Views: 280

Answers (1)

Rahul Sharma
Rahul Sharma

Reputation: 5995

Create a REST endpoint at <your_server>:<port>/healthcheck which returns 200 HTTP response code with response may be {"status": "ok"} and point the ALB health check there.

Upvotes: 2

Related Questions