Host Your Application On AWS With Sticky Session & WebSockets Support

It looks like many people are missing it (me included) that it’s finally possible to host meteor on AWS with their new AWS ELB ALB (Application Load Balancer) https://aws.amazon.com/elasticloadbalancing/applicationloadbalancer/

This means a cost savings configurable high availability and autoscaling setup!

I’m moving to AWS in the next 2 weeks and here is a nice tutorial that might be helpful for others as well:

It’s not complete in a step by step of really how to do it, you will have to figure some stuff out. So if you’re successful share it here or even create a nice tutorial if you’re up to it, will update the thread as soon I’m on AWS and how it went.

Good luck!

Thanks @voidale! These deployment scripts might come in handy to recompile / deploy. As well as nginx conf files: https://github.com/ramezrafla/meteor-deployment

This seems like it will complicate deployment a bit (taken from https://aws.amazon.com/elasticloadbalancing/applicationloadbalancer/):

The Application Load Balancer is only supported for use within an Amazon Virtual Private Cloud (VPC).

I did this when the application load balancer came out because you can terminate ssl at the load balancer and I thought it could be convenient. I set sticky sessions. It was fine for most of my app, but I have one part where I’m making many requests (its a large and complex app), and it would cause my DDP connection to drop, which killed the rest of the pages of my app.

tldr; probably works for most lightweight applications. I’m assuming its AWS’s fault

Update: moved to AWS, it works wonderfully super happy :slight_smile:

Would you be willing to share the deployment config files and setup scripts you used?

1 Like