My question here is either I have to go for AWS Application load balancer or nginx or haproxy load balancer setup on AWS EC2 instance? I am more concern about pricing and can not afford downtime.
Need to make up a couple of load scenarios – low, medium, high and work out a price point for each in aws appication load balancer vs nginx on ec2 instance.
Can anyone suggest best use cases based on your experience?
2
Answers
EC2:
ELB:
For ELB calculations you can try this AWS ELB calculator
For EC2 + Nginx you can use AWS Pricing Calculator
From my experience – go for ELB. You set this up once and don’t even care about anything else. It’s easy to configure (IaC), it has 99.95% uptime (you won’t get similar with ec2+nginx), and it’s not so expensive. Additionally you can attach AWS WAF to ELB now, and you can easly point your CloudFront distribution to ELB.
I think that more traffic should be directly proportional to more money ingress by your site, so don’t be afraid of the traffic ingress. Of course, you will pay more in AWS but you will have fewer headaches when a problem comes and downtime.
Just imagine you put all of your efforts now. Then the design complexity increases because of traffic volume. After that you think "well at this point I think I need some help" …but you are at EC2, more difficult to scale without downtime. Also may be your knowledge about devops doesnt let you solve the problem quickly.