Answer the question
In order to leave comments, you need to log in
How to properly set up a scalable web server on AWS?
There is such task:
there is a site with constant insignificant loading.
Sometimes there is traffic on it and then the load increases sharply and furiously.
Question: does it make sense to use AWS for this?
Do I understand correctly that AWS T2 instances can scale to the right load?
Answer the question
In order to leave comments, you need to log in
everything is simple there - you change class and
it’s only expensive to go forward, 4-8 times like this from OVH
1. It makes sense to use AWS. But first of all, your application itself must be scalable - the server must be stateless and not store any data locally (including user sessions), ELB must be configured on AWS, which will distribute traffic between your instances. If everything depends on the database, then you can make read-replicas for it, for example.
2. T2 instances can't scale on their own. T2 are the simplest machines that have time limits for maximum load on them - in terms of Amazon, this is called CPU Credits. The idea is that you can give a load above 20% (this threshold is different for different types) only for a certain time (an hour, two, more - again, this time varies for different instances), after which your instance will drop to basic performance (that is, rather low).
In short - T2 holds peaks, but does not hold a sustained load.
For dynamic scaling, you can use Cloudwatch to catch an increase in the amount of consumed resources and instruct ASG to raise more instances (or lower them if the load has dropped). You can do the same using your own monitoring and AWS API for cloud management.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question