2022-10-02

Scaling Performances of Lambda, Fargate and EC2 in 2022

Introduction

Drawing insights from an in-depth study found at the following link, this article aims to dissect the scaling performances of AWS services like Lambda, ECS on EC2, and ECS on Fargate in the year 2022.

https://www.vladionescu.me/posts/scaling-containers-on-aws-in-2022/

ECS on EC2 vs. ECS on Fargate

The illustration underneath demonstrates the scaling potential from 0 to 3500 containers on EC2, varying with the number of services.

ECS on EC2
Scaling containers on AWS in 2022

  • All services initiate scaling around the 2.5-minute mark.
  • ECS on EC2 with a single service can scale up to approximately 1600 containers within ten minutes.
  • ECS on EC2 equipped with 5 and 7 services can reach a scaling height of 3500 containers within the same duration.
  • ECS on EC2 with 10 services can scale up to 2500 containers within ten minutes.

The subsequent illustration represents the scaling capacity from 0 to 3500 containers on Fargate.

ECS on Fargate
Scaling containers on AWS in 2022

  • ECS on Fargate with 2 services takes about eight minutes to scale.
  • With 3 services, the scaling time drops to about six minutes.
  • For 5 and 7 services, it takes approximately five minutes each to scale.

ECS on Fargate vs. Lambda

The following graph delineates the scaling performance from 0 to 10,000 containers.

Lambda vs ECS on Fargate
Scaling containers on AWS in 2022

  • ECS on Fargate commences around the 30-second mark, smoothly growing to about 10,000 containers around the ten-minute mark.
  • Lambda, on the other hand, experiences an immediate spike to 3000 containers, then another surge to 3500 containers, following which it exhibits a stair-step pattern, spiking an additional 500 containers every minute.

Lambda vs. ECS(or EKS) on Fargate vs. ECS(or EKS) on EC2

The illustration below highlights the time taken to scale from 0 to 3500 containers across different platforms.

Lambda vs. ECS(or EKS) on Fargate vs. ECS(or EKS) on EC2
Scaling containers on AWS in 2022

  • Lambda exhibits an immediate surge to 3000 containers, followed by a jump to 3500 containers.
  • ECS on Fargate embarks on its scaling journey after 30 seconds, reaching near 3500 around the 4.5-minute mark.
  • EKS on Fargate initiates scaling after approximately one minute, nearing 3500 containers around the 8.5-minute mark.
  • EKS on EC2 starts its scaling process after a lag of about 2.5 minutes, finally achieving the 3500-container milestone around the 6.5-minute mark.
  • Lastly, ECS on EC2 commences scaling after a 2.5-minute delay and reaches the 3500-container mark around the ten-minute mark.

References

https://www.vladionescu.me/posts/scaling-containers-on-aws-in-2022/

Ryusei Kakujo

researchgatelinkedingithub

Focusing on data science for mobility

Bench Press 100kg!