Auto scaling is not able to scale enough in a short time

0

I am not an expert in this part of AWS and I have some doubts about what is happening in my app.

My backend application becomes unresponsive for a few seconds/minutes when it receives a sharp spike in requests. Apparently the problem is that it can't scale fast enough. A quick but more expensive solution we have addressed this with is to increase the standby instances.

But... Is there another way to handle sudden spikes in requests? Is this a configuration issue with my load balancer? How can I improve autoscaling?

Thanks in advance

Gabym
질문됨 8달 전415회 조회
2개 답변
1

Depending on your setup, there's multiple ways to address this issue that comes with an increase cost. Take a look cloudwatch metrics to identify the bottle neck in your setup such cpu, network, RTT, load time, etc....

Here's something you can use to address the performance issues:

  1. CDN
  2. Caching with in-memory database such as elastic-cache to cache db queries.
  3. Upgrade your instance size
  4. Load Balancer
  5. Read only DB offload the read queries
  6. Increase storage type
AWS
nael
답변함 8달 전
profile picture
전문가
검토됨 8달 전
  • In addition to the above:

    1. Figure out where the delays are (waiting for alarm; bootstrapping; waiting for instance launch; etc)
    2. Use a Warm Pool on the ASG if there's long bootstrapping time
    3. Set the scale-out threshold less aggressively
    4. If the spikes are predictable; use Scheduled or Predictive Scaling policies
0

There's not enough information in the question to give a definitive answer.

The majority of scaling time is normally in creating the compute that will handle the request(s) that are arriving. So it's important to know whether you're using EC2, ECS, EKS, Lambda, etc. Operating system can also be a factor here. Without that information it's difficult to provide advice.

You have mentioned using a load balancer so the implication is that your back end infrastructure is EC2-based. Here is some general advice:

  • Make your AMI (or container image) as small as possible and bake in as much as possible. That way launch times for new instances will be faster.
  • Adjust your auto-scaling parameters so that you scale sooner rather than later.
  • You may have to keep more instances running at all times in order to deal with spikes in traffic.
  • Finally, you might try using predictive scaling.
profile pictureAWS
전문가
답변함 8달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠