Using Meteor with load balancers, and specifically with AWS?


What is the right way to set this up? e.g. I setup ALB (Application Load Balancer) on AWS because it supports websockets, with 3 EC2 instances in the target group. From what I read, to enable sticky sessions you need to turn on the cookie support and give a ‘stickiness’ time. e.g. I chose 5min.

Now to test this, I connect via a client and then shut that instance off. When I refresh, I get a 404. Shouldn’t the LB detect that the target is down and send traffic somewhere else?

Also I don’t see a way to configure it to use ‘least connections’, in fact there’s no policy at all.

This is the doc -

imp parts -

WebSockets connections are inherently sticky. If the client requests a connection upgrade to WebSockets, the target that returns an HTTP 101 status code to accept the connection upgrade is the target used in the WebSockets connection. After the WebSockets upgrade is complete, cookie-based stickiness is not used.

Does this mean I don’t need to enable cookied based stickiness for Meteor?


This might be of interest: