MemberMarch 22, 2021 at 10:30 pm
let’s say i m building a ecommerce store. i have 3 servers and load balancer.
how does each server process the shopping orders, state of carts?
i suspect i need to put some additional software on them? they don’t magically process anything just because i launched them.
in general, i know ec2 does whatever i want. but do i need to install some additional software?
AdministratorMarch 22, 2021 at 11:59 pm
A common design pattern for handling orders in load-balanced EC2 instances is to use a decoupling layer between the client and your servers. A popular choice is Amazon SQS. You get the order data from the SQS queue and process them in the instances. The advantage of this is that in the event of an instance failure, orders will still persist in the queue and will not be lost.
Log in to reply.