HACKER Q&A
📣 type4

Transitioning from a single EC2 instance to something more resiliant?


My situation is that I have a Django application that gets a decent amount of traffic, a growing amount. There's some backend stuff that happens on requests in addition to hitting the DB. Postgres/Django/Redis/a bunch of cron jobs are all on one instance and I think it's time to split things off to a more resilient architecture, I'd be screwed if for some reason this thing explodes.

It's overwhelming with all the different services and methodologies available, was wondering what people here think the 'best' way to approach this would be.


  👤 drost Accepted Answer ✓
I'm sure there are a number of ways to do this but here's how I would approach it.

1. Move Postgres to either it's own instance or use RDS

2. Move Redis to either it's own instance or use Elasticache

3. Convert your cron jobs to Lambda functions that run on cron timer

4. Move your EC2 instance behind a load balancer and create an autoscaling group