Containers or Serverless Functions : When to choose What - cheatsheet for you.

Containers or Serverless Functions : When to choose What - cheatsheet for you.

Recently I attended the AWS Innovate sessions organized by Amazon Web Services (AWS) which had a session presented by Karan Thanvi , same as the title.

Here I am sharing the key takeaways that can help you decide, and save some research and time!


Serverless Functions VS Containers
Containers :

Trending since last couple of years or so due to?their optimized resource utilization, portability when compared to traditional VMs,

One negative point would be that they run 24X7 waiting for a request and this adds up the cost.

Serverless :

With Serverless we always have these 4 assured properties :?

- No need to provision and manage servers.

- Never pay for ideal resources.

- Service auto-scales.

- Inherently Highly Available.?

So when it comes to Serverless Functions, they are always invoked, NEVER sitting idle to listen to a request.

AWS Lambda service provides us Event Source Mapping that listens to messages/events and triggers the function.


Comparison results :

COST?

For containers you pay per instance, for serverless functions you pay per use.


Container - pay per instance


Serverless - pay per use

FLEXIBILITY?

Containers offer more flexibility, like

  • Choice of hardware,
  • Fine-tuning the OS,
  • Many developer-friendly tools


SIMPLICITY?

  • Functions are simple to run, generic choices for hardware (Memory, CPU, Temp storage),?
  • Go global easily,
  • Highly integrated with the cloud environment, many possible use-cases.


Bridging the gap : SERVERLESS CONTAINERS

What if we use containers, the serverless way, to get the best of both worlds.

Here are the two choices :?

Fargate : Run containers without needing to fine-grain control over underlying infra.

App Runner : App Runner takes it one step further, with no need to configure networking or cluster orchestration even.


Fargate - Serverless Compute Engine for containers


AWS App Runner - Managed Container Apps service



I hope this article helps you understand the fundamental differences and primary use cases for both containers and serverless functions, also highlighting that things are not black and white anymore, thanks to serverless containers!

If you have any questions, feel free to reach out! I'll be happy to help from my experience.

I'll be sharing more posts and articles based on cloud trends and updates mixed with hands-on labs!

#AWS #CloudComputing #AWSinnovate

Astha Sethi

Data Analyst @ OpenSky Data Systems | Microsoft Certified: Power BI Data Analyst Associate

4 个月

Interesting

Karan Thanvi

Solutions Architect - Startups @ AWS

4 个月

Thank you Arnauv Kaushik :) hope you had enjoyed the session!

Mohamed Zagre

| ????DevOps Engineer | ?? Cloud Engineer | ?? AWS Architect | ?? System Design | ??HashiCorp Certified Terraform Associate | ?? 2x Kubernetes Certified CKA/CKAD | ?? Linux Certified

4 个月

Very helpful

要查看或添加评论,请登录

Arnauv Kaushik的更多文章

社区洞察

其他会员也浏览了