Reputation: 506
At the moment I have one EC2 Instance (2 CPU, 8GB RAM, Linux) that has on it:
Now this works fine with low traffic, but as the traffic increases (10k visits in minutes/hours) the whole thing is getting overwhelmed and the CPU is going into the burstable zone. This is also a dangerous approach, as all my functionality is on one instance. As a fast solution I clustered the server (1) using my PM2 manager and it's working a bit better now. But as a long term solution I need to split the things and use load balancing. This is how I thought to split it into different EC2 instances:
Now I have two questions:
Upvotes: 0
Views: 434
Reputation: 11638
this means you always have at least one healthy instance of each service behind a load balancer, and as you add or remove individual service nodes your DNS records etc remain the same - you can scale your microservice to 3 nodes without needing to change anything anywhere else.
this adds cost, but provides redundancy - which is one of the primary points of using cloud infrastructure.
Upvotes: 1