Cloud Technology

Is serverless or containerization better for high-traffic web applications?

AM Asked by Amanda White · 20-10-2023
0 upvotes 18,123 views 0 comments
The question

We are re-platforming our e-commerce site and debating between AWS Lambda (Serverless) and Amazon EKS (Kubernetes). Our traffic is very spiky, especially during flash sales. While serverless seems easier to scale, I’m worried about "cold starts" and long-term costs. Which architecture offers the best balance of performance and scalability for a growing retail brand? 

3 answers

0
EL
Answered on 22-10-2023

The choice depends on your execution duration and frequency. Serverless is unbeatable for event-driven tasks and highly unpredictable traffic because you only pay for the exact milliseconds used. To mitigate cold starts, use "Provisioned Concurrency," though that adds cost. However, for a consistent e-commerce baseline, Containers (K8s) are often more cost-effective. You can use Horizontal Pod Autoscaling (HPA) to handle the spikes while maintaining warm instances for your core checkout flow. If your application has long-running processes (over 15 minutes), Lambda isn't even an option due to its timeout limits. I’d suggest a hybrid approach: K8s for the core API and Lambda for image processing or email triggers.

0
CH
Answered on 25-10-2023

Have you benchmarked the Latency difference between a warm container and a cold Lambda function for your specific user-facing API calls?

 

TH 28-10-2023

Christopher, that latency is the silent killer of conversion rates! Amanda, for e-commerce, every 100ms of delay can cost 1% in sales. If you go serverless, keep your functions small and use a language like Go or Node.js, which have much faster start times than Java. Also, consider a Content Delivery Network (CDN) like CloudFront to cache as much as possible at the edge. This reduces the number of times your backend (serverless or container) even needs to be hit, which solves both the cost and the speed problem simultaneously.

0
SU
Answered on 30-10-2023

I prefer Serverless because it removes the "Ops" from DevOps. My team focuses on code, not patching worker nodes or managing Kubernetes clusters.

 

AM 01-11-2023

Susan makes a great point. The "Total Cost of Ownership" includes developer hours. Serverless often wins when you factor in the salary of a K8s expert.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

World globe icon Country: Canada

Book Free Session