SlideShare a Scribd company logo
ESCALABILIDADE COM
LAMBDA E ELASTIC
BEANSTALK – PARTE I
ZOOX – MARÇO 2020
PARTE I
• O que é escalabilidade?
• Visão geral do Elastic Benstalk
• Visão geral do Lambda
• Prós, Contras e comparativos entre os dois
• Considerações importantes de escalabilidade
• Banco de dados numa aplicação escalável
O QUE É ESCALAR UM SISTEMA?
SISTEMA
?
ESCALABILIDADE
“Scalability is the property of a system
to handle a growing amount of work
by adding resources to the system”
• Geographic scalability: The ability to
maintain effectiveness during
expansion from a local area to a
larger region.
• Load scalability: The ability for
a distributed system to expand and
contract to accommodate heavier or
lighter loads, including, the ease
with which a system or component
can be modified, added, or
removed, to accommodate changing
loads.
ESCALABILIDADE NUMA APLICAÇÃO
Front Back Cache Database
AWS ELASTIC BEANSTALK
• “AWS Elastic Beanstalk is an easy-to-use service for deploying and
scaling web applications and services”
• “You can simply upload your code and Elastic Beanstalk automatically
handles the deployment, from capacity provisioning, load balancing,
auto-scaling to application health monitoring. At the same time, you
retain full control over the AWS resources powering your application
and can access the underlying resources at any time.”
• “There is no additional charge for Elastic Beanstalk - you pay only for
the AWS resources needed to store and run your applications.”
WEB SERVER ENVIRONMENT
WORKER ENVIRONMENT
Escalabilidade com Lambda e Elastic Beanstalk – Parte I
Escalabilidade com Lambda e Elastic Beanstalk – Parte I
Escalabilidade com Lambda e Elastic Beanstalk – Parte I
Escalabilidade com Lambda e Elastic Beanstalk – Parte I
Escalabilidade com Lambda e Elastic Beanstalk – Parte I
ELASTIC BEANSTALK
PRÓS
• Variedade de linguagens e
docker
• Deploy, balanceamento, controle
de versão, escalabilidade
• Deploy muito fácil
• Tipos de deploy
• Altamento configurável
• Custo 0 (paga estrutura por trás)
CONTRAS
• Muito sensível a falhas de
deploy
• Configuração inicial complexa
• Busca por erros difícil
• Deploy pode demorar muito
• Limitado em alguns pontos
• Versões das linguages demoram
• Permissionamento
LAMBDA
• “AWS Lambda lets you run code without provisioning or
managing servers. You pay only for the compute time you
consume.”
• “With Lambda, you can run code for virtually any type of
application or backend service - all with zero administration.
Just upload your code and Lambda takes care of everything
required to run and scale your code with high availability. You
can set up your code to automatically trigger from other AWS
services or call it directly from any web or mobile app.”
Escalabilidade com Lambda e Elastic Beanstalk – Parte I
Escalabilidade com Lambda e Elastic Beanstalk – Parte I
LAMBDA – COLD START
LAMBDA
PRÓS
• Custo reduzido para baixo
tráfego
• Sem necessidade de
gerenciamento
• Rápido desenvolvimento (1
função)
• Alta escalabilidade
• Deploy independente por
função
CONTRAS
• Alto custo para grande tráfego
• Sem controle sobre ambiente
• Arquitetura complexa
• Quantidade de funções aumenta rápido
• DoS (1000 concorrências)
• Duração (máximo de 15 minutos)
• Cold Starts
• Monitorar / debugar (onde achar um erro entre
300 funções)
COMPARAÇÃO DE CUSTO
• EB
EC2 micro (1GB mem) = $6 /
mês
• LAMBDA
Total compute (sec) = 1440 * (0.2s) = 288 secs
Total compute (GB-s) = 1440 * 512MB/1024 =
720 GB-s
Monthly compute charges = 720 *
$0.00001667 = $0.0120024
Monthly request charges = 1440 * $0.2/M =
$0.2
Total = $0.3 / month
1440 reqs/mes (1 req a cada 30 min), duração 200ms, 512MB
LAMBDA 95% mais barato
COMPARAÇÃO DE CUSTO
• EB
EC2 small (2GB mem) = $20 /
month
• LAMBDA
Total compute (seconds) = 3M * (0.2s) =
600,000 seconds
Total compute (GB-s) = 3M * 512MB/1024 =
1.5M GB-s
Monthly compute charges = 1.5M *
$0.00001667 = $25
Monthly request charges = 3M * $0.2/M = $0.6
Total = $25.2 / month
3M reqs/month (35 r/s), duration 200ms, 512MB
LAMBDA 25% mais caro
COMPARAÇÃO DE CUSTO
• EB
3x EC2 small (2GB mem) = $60 /
month
• LAMBDA
Total compute (seconds) = 30M * (0.2s) = 6M
seconds
Total compute (GB-s) = 30M * 512MB/1024 =
15M GB-s
Monthly compute charges = 15M *
$0.00001667 = $250
Monthly request charges = 30M * $0.2/M = $6
Total = $256 / month
30M reqs/month (350 r/s), duration 200ms, 512MB
LAMBDA 420% mais caro
COMPARAÇÃO DE CUSTO
• EB
10x EC2 small (2GB mem) =
$200 / month
• LAMBDA
Total compute (seconds) = 570M * (0.2s) =
114M seconds
Total compute (GB-s) = 570M * 512MB/1024 =
285M GB-s
Monthly compute charges = 285M *
$0.00001667 = $4750
Monthly request charges = 570M * $0.2/M =
$114
Total = $4864 / month
api company (situacao em 2020-02) 570M reqs/month (6600 r/s), duration 200ms,
512MB
LAMBDA 2300% mais caro
COMPARAÇÃO DE CUSTO
MULTI-REGION
MULTI-REGION
DATABASES
• Pontos obrigatórios
1. Replicação para outras regiões com baixa latência
2. Serviço gerenciado
3. Baixo custo
• Desejáveis
1. NoSQL para evitar migrations
2. Global Write
DATABASES
MySQL Aurora MongoDB DynamoDB
Replicação X X X X
Gerenciado X X X X
NoSQL X X
Global Write +- X
Facilidade de uso X X X
DATABASES - MONGODB
$ 2,776 / mon
$ 870 / mont
AUTO-SCALE
AUTO SCALING EM AÇÃO
DYNAMODB
DYNAMODB COM REPLICAÇÃO
16 req / seg
Ad

More Related Content

What's hot (20)

A brief introduction to CloudFormation
A brief introduction to CloudFormationA brief introduction to CloudFormation
A brief introduction to CloudFormation
SWIFTotter Solutions
 
20160929 serverless-conf-osaka
20160929 serverless-conf-osaka20160929 serverless-conf-osaka
20160929 serverless-conf-osaka
Shogo Muranushi
 
Amazon WebServices lection 1
Amazon WebServices lection 1Amazon WebServices lection 1
Amazon WebServices lection 1
Binary Studio
 
Introduction to Windows Azure Service Bus Relay Service
Introduction to Windows Azure Service Bus Relay ServiceIntroduction to Windows Azure Service Bus Relay Service
Introduction to Windows Azure Service Bus Relay Service
Tamir Dresher
 
Adopting serverless
Adopting serverlessAdopting serverless
Adopting serverless
Gayan Hewa
 
Aws Fargate clusterless serverless
Aws Fargate clusterless serverlessAws Fargate clusterless serverless
Aws Fargate clusterless serverless
Rodrigo Galba
 
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Seven Peaks Speaks
 
AWS systems manager | Francisco edilton
AWS systems manager | Francisco edilton  AWS systems manager | Francisco edilton
AWS systems manager | Francisco edilton
AWSCOMSUM
 
Performance Tales of Serverless - CloudNative London 2018
Performance Tales of Serverless - CloudNative London 2018Performance Tales of Serverless - CloudNative London 2018
Performance Tales of Serverless - CloudNative London 2018
☁️ Mikhail Shilkov
 
Not all that glitter is AWS - Nerdearla2016
Not all that glitter is AWS - Nerdearla2016Not all that glitter is AWS - Nerdearla2016
Not all that glitter is AWS - Nerdearla2016
Sebastian Montini
 
Amazon Webservice & Cloud Computing
Amazon Webservice & Cloud ComputingAmazon Webservice & Cloud Computing
Amazon Webservice & Cloud Computing
Jack Smith
 
The future of cloud programming
The future of cloud programmingThe future of cloud programming
The future of cloud programming
Jason Straughan
 
20160916 aws premier-night-v2-public
20160916 aws premier-night-v2-public20160916 aws premier-night-v2-public
20160916 aws premier-night-v2-public
Shogo Muranushi
 
104 meets cloud
104 meets cloud104 meets cloud
104 meets cloud
Cliff Chao-kuan Lu
 
Switching SaaS Hosting From dedicated virtual machines to container-based clu...
Switching SaaS Hosting From dedicated virtual machines to container-based clu...Switching SaaS Hosting From dedicated virtual machines to container-based clu...
Switching SaaS Hosting From dedicated virtual machines to container-based clu...
AWS Germany
 
AWS guerrilla orchestration
AWS guerrilla orchestrationAWS guerrilla orchestration
AWS guerrilla orchestration
Slobodan Utvić
 
Cloud service-definition
Cloud service-definitionCloud service-definition
Cloud service-definition
Naveen Joy
 
Dray
DrayDray
Dray
Brian DeHamer
 
Practical Cloud
Practical CloudPractical Cloud
Practical Cloud
Lynn Langit
 
Serverless Framework (2018)
Serverless Framework (2018)Serverless Framework (2018)
Serverless Framework (2018)
Rowell Belen
 
A brief introduction to CloudFormation
A brief introduction to CloudFormationA brief introduction to CloudFormation
A brief introduction to CloudFormation
SWIFTotter Solutions
 
20160929 serverless-conf-osaka
20160929 serverless-conf-osaka20160929 serverless-conf-osaka
20160929 serverless-conf-osaka
Shogo Muranushi
 
Amazon WebServices lection 1
Amazon WebServices lection 1Amazon WebServices lection 1
Amazon WebServices lection 1
Binary Studio
 
Introduction to Windows Azure Service Bus Relay Service
Introduction to Windows Azure Service Bus Relay ServiceIntroduction to Windows Azure Service Bus Relay Service
Introduction to Windows Azure Service Bus Relay Service
Tamir Dresher
 
Adopting serverless
Adopting serverlessAdopting serverless
Adopting serverless
Gayan Hewa
 
Aws Fargate clusterless serverless
Aws Fargate clusterless serverlessAws Fargate clusterless serverless
Aws Fargate clusterless serverless
Rodrigo Galba
 
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Seven Peaks Speaks
 
AWS systems manager | Francisco edilton
AWS systems manager | Francisco edilton  AWS systems manager | Francisco edilton
AWS systems manager | Francisco edilton
AWSCOMSUM
 
Performance Tales of Serverless - CloudNative London 2018
Performance Tales of Serverless - CloudNative London 2018Performance Tales of Serverless - CloudNative London 2018
Performance Tales of Serverless - CloudNative London 2018
☁️ Mikhail Shilkov
 
Not all that glitter is AWS - Nerdearla2016
Not all that glitter is AWS - Nerdearla2016Not all that glitter is AWS - Nerdearla2016
Not all that glitter is AWS - Nerdearla2016
Sebastian Montini
 
Amazon Webservice & Cloud Computing
Amazon Webservice & Cloud ComputingAmazon Webservice & Cloud Computing
Amazon Webservice & Cloud Computing
Jack Smith
 
The future of cloud programming
The future of cloud programmingThe future of cloud programming
The future of cloud programming
Jason Straughan
 
20160916 aws premier-night-v2-public
20160916 aws premier-night-v2-public20160916 aws premier-night-v2-public
20160916 aws premier-night-v2-public
Shogo Muranushi
 
Switching SaaS Hosting From dedicated virtual machines to container-based clu...
Switching SaaS Hosting From dedicated virtual machines to container-based clu...Switching SaaS Hosting From dedicated virtual machines to container-based clu...
Switching SaaS Hosting From dedicated virtual machines to container-based clu...
AWS Germany
 
AWS guerrilla orchestration
AWS guerrilla orchestrationAWS guerrilla orchestration
AWS guerrilla orchestration
Slobodan Utvić
 
Cloud service-definition
Cloud service-definitionCloud service-definition
Cloud service-definition
Naveen Joy
 
Serverless Framework (2018)
Serverless Framework (2018)Serverless Framework (2018)
Serverless Framework (2018)
Rowell Belen
 

Similar to Escalabilidade com Lambda e Elastic Beanstalk – Parte I (20)

Serverless Comparison: AWS vs Azure vs Google vs IBM
Serverless Comparison: AWS vs Azure vs Google vs IBMServerless Comparison: AWS vs Azure vs Google vs IBM
Serverless Comparison: AWS vs Azure vs Google vs IBM
RightScale
 
Deploying microservices on AWS
Deploying microservices on AWSDeploying microservices on AWS
Deploying microservices on AWS
Michael Haberman
 
Serverless applications
Serverless applicationsServerless applications
Serverless applications
mbaric
 
Serverless Architectures on AWS Lambda
Serverless Architectures on AWS LambdaServerless Architectures on AWS Lambda
Serverless Architectures on AWS Lambda
Serhat Can
 
From Serverless to InterCloud
From Serverless to InterCloudFrom Serverless to InterCloud
From Serverless to InterCloud
Wayne Scarano
 
AWS Lambda Presentation (Tech Talk DC)
AWS Lambda Presentation (Tech Talk DC)AWS Lambda Presentation (Tech Talk DC)
AWS Lambda Presentation (Tech Talk DC)
Doguhan Uluca
 
Operational challenges behind Serverless architectures
Operational challenges behind Serverless architecturesOperational challenges behind Serverless architectures
Operational challenges behind Serverless architectures
Laurent Bernaille
 
AWS Serverless solution for developers
AWS Serverless solution for developersAWS Serverless solution for developers
AWS Serverless solution for developers
Michael Haberman
 
How to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless EditionHow to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless Edition
ecobold
 
Scaling a MeteorJS SaaS app on AWS
Scaling a MeteorJS SaaS app on AWSScaling a MeteorJS SaaS app on AWS
Scaling a MeteorJS SaaS app on AWS
Brett McLain
 
AWS for the Java Developer
AWS for the Java DeveloperAWS for the Java Developer
AWS for the Java Developer
Rory Preddy
 
Running SQL Server on AWS | John McCormack | DataGrillen 2019
Running SQL Server on AWS | John McCormack | DataGrillen 2019Running SQL Server on AWS | John McCormack | DataGrillen 2019
Running SQL Server on AWS | John McCormack | DataGrillen 2019
John McCormack
 
Microservices Manchester: Serverless Architectures By Rafal Gancarz
Microservices Manchester: Serverless Architectures By Rafal GancarzMicroservices Manchester: Serverless Architectures By Rafal Gancarz
Microservices Manchester: Serverless Architectures By Rafal Gancarz
OpenCredo
 
Serverless Node.js
Serverless Node.jsServerless Node.js
Serverless Node.js
The Software House
 
AWS Lambda, Step Functions & MongoDB Atlas Tutorial
AWS Lambda, Step Functions & MongoDB Atlas TutorialAWS Lambda, Step Functions & MongoDB Atlas Tutorial
AWS Lambda, Step Functions & MongoDB Atlas Tutorial
MongoDB
 
AWS 2017 re:Invent re:Cap - TriNimbus Presentation Slides
AWS 2017 re:Invent re:Cap - TriNimbus Presentation SlidesAWS 2017 re:Invent re:Cap - TriNimbus Presentation Slides
AWS 2017 re:Invent re:Cap - TriNimbus Presentation Slides
TriNimbus
 
Čtvrtkon #64 - AWS Serverless - Michal Haták
Čtvrtkon #64 - AWS Serverless - Michal HatákČtvrtkon #64 - AWS Serverless - Michal Haták
Čtvrtkon #64 - AWS Serverless - Michal Haták
Ctvrtkoncz
 
How to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless EditionHow to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless Edition
Lecole Cole
 
Introduce AWS Lambda for newbie and Non-IT
Introduce AWS Lambda for newbie and Non-ITIntroduce AWS Lambda for newbie and Non-IT
Introduce AWS Lambda for newbie and Non-IT
Chitpong Wuttanan
 
AWS for Java Developers workshop
AWS for Java Developers workshopAWS for Java Developers workshop
AWS for Java Developers workshop
Rory Preddy
 
Serverless Comparison: AWS vs Azure vs Google vs IBM
Serverless Comparison: AWS vs Azure vs Google vs IBMServerless Comparison: AWS vs Azure vs Google vs IBM
Serverless Comparison: AWS vs Azure vs Google vs IBM
RightScale
 
Deploying microservices on AWS
Deploying microservices on AWSDeploying microservices on AWS
Deploying microservices on AWS
Michael Haberman
 
Serverless applications
Serverless applicationsServerless applications
Serverless applications
mbaric
 
Serverless Architectures on AWS Lambda
Serverless Architectures on AWS LambdaServerless Architectures on AWS Lambda
Serverless Architectures on AWS Lambda
Serhat Can
 
From Serverless to InterCloud
From Serverless to InterCloudFrom Serverless to InterCloud
From Serverless to InterCloud
Wayne Scarano
 
AWS Lambda Presentation (Tech Talk DC)
AWS Lambda Presentation (Tech Talk DC)AWS Lambda Presentation (Tech Talk DC)
AWS Lambda Presentation (Tech Talk DC)
Doguhan Uluca
 
Operational challenges behind Serverless architectures
Operational challenges behind Serverless architecturesOperational challenges behind Serverless architectures
Operational challenges behind Serverless architectures
Laurent Bernaille
 
AWS Serverless solution for developers
AWS Serverless solution for developersAWS Serverless solution for developers
AWS Serverless solution for developers
Michael Haberman
 
How to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless EditionHow to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless Edition
ecobold
 
Scaling a MeteorJS SaaS app on AWS
Scaling a MeteorJS SaaS app on AWSScaling a MeteorJS SaaS app on AWS
Scaling a MeteorJS SaaS app on AWS
Brett McLain
 
AWS for the Java Developer
AWS for the Java DeveloperAWS for the Java Developer
AWS for the Java Developer
Rory Preddy
 
Running SQL Server on AWS | John McCormack | DataGrillen 2019
Running SQL Server on AWS | John McCormack | DataGrillen 2019Running SQL Server on AWS | John McCormack | DataGrillen 2019
Running SQL Server on AWS | John McCormack | DataGrillen 2019
John McCormack
 
Microservices Manchester: Serverless Architectures By Rafal Gancarz
Microservices Manchester: Serverless Architectures By Rafal GancarzMicroservices Manchester: Serverless Architectures By Rafal Gancarz
Microservices Manchester: Serverless Architectures By Rafal Gancarz
OpenCredo
 
AWS Lambda, Step Functions & MongoDB Atlas Tutorial
AWS Lambda, Step Functions & MongoDB Atlas TutorialAWS Lambda, Step Functions & MongoDB Atlas Tutorial
AWS Lambda, Step Functions & MongoDB Atlas Tutorial
MongoDB
 
AWS 2017 re:Invent re:Cap - TriNimbus Presentation Slides
AWS 2017 re:Invent re:Cap - TriNimbus Presentation SlidesAWS 2017 re:Invent re:Cap - TriNimbus Presentation Slides
AWS 2017 re:Invent re:Cap - TriNimbus Presentation Slides
TriNimbus
 
Čtvrtkon #64 - AWS Serverless - Michal Haták
Čtvrtkon #64 - AWS Serverless - Michal HatákČtvrtkon #64 - AWS Serverless - Michal Haták
Čtvrtkon #64 - AWS Serverless - Michal Haták
Ctvrtkoncz
 
How to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless EditionHow to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless Edition
Lecole Cole
 
Introduce AWS Lambda for newbie and Non-IT
Introduce AWS Lambda for newbie and Non-ITIntroduce AWS Lambda for newbie and Non-IT
Introduce AWS Lambda for newbie and Non-IT
Chitpong Wuttanan
 
AWS for Java Developers workshop
AWS for Java Developers workshopAWS for Java Developers workshop
AWS for Java Developers workshop
Rory Preddy
 
Ad

Recently uploaded (20)

Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Ad

Escalabilidade com Lambda e Elastic Beanstalk – Parte I

  • 1. ESCALABILIDADE COM LAMBDA E ELASTIC BEANSTALK – PARTE I ZOOX – MARÇO 2020
  • 2. PARTE I • O que é escalabilidade? • Visão geral do Elastic Benstalk • Visão geral do Lambda • Prós, Contras e comparativos entre os dois • Considerações importantes de escalabilidade • Banco de dados numa aplicação escalável
  • 3. O QUE É ESCALAR UM SISTEMA? SISTEMA ?
  • 4. ESCALABILIDADE “Scalability is the property of a system to handle a growing amount of work by adding resources to the system” • Geographic scalability: The ability to maintain effectiveness during expansion from a local area to a larger region. • Load scalability: The ability for a distributed system to expand and contract to accommodate heavier or lighter loads, including, the ease with which a system or component can be modified, added, or removed, to accommodate changing loads.
  • 6. AWS ELASTIC BEANSTALK • “AWS Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services” • “You can simply upload your code and Elastic Beanstalk automatically handles the deployment, from capacity provisioning, load balancing, auto-scaling to application health monitoring. At the same time, you retain full control over the AWS resources powering your application and can access the underlying resources at any time.” • “There is no additional charge for Elastic Beanstalk - you pay only for the AWS resources needed to store and run your applications.”
  • 14. ELASTIC BEANSTALK PRÓS • Variedade de linguagens e docker • Deploy, balanceamento, controle de versão, escalabilidade • Deploy muito fácil • Tipos de deploy • Altamento configurável • Custo 0 (paga estrutura por trás) CONTRAS • Muito sensível a falhas de deploy • Configuração inicial complexa • Busca por erros difícil • Deploy pode demorar muito • Limitado em alguns pontos • Versões das linguages demoram • Permissionamento
  • 15. LAMBDA • “AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume.” • “With Lambda, you can run code for virtually any type of application or backend service - all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.”
  • 19. LAMBDA PRÓS • Custo reduzido para baixo tráfego • Sem necessidade de gerenciamento • Rápido desenvolvimento (1 função) • Alta escalabilidade • Deploy independente por função CONTRAS • Alto custo para grande tráfego • Sem controle sobre ambiente • Arquitetura complexa • Quantidade de funções aumenta rápido • DoS (1000 concorrências) • Duração (máximo de 15 minutos) • Cold Starts • Monitorar / debugar (onde achar um erro entre 300 funções)
  • 20. COMPARAÇÃO DE CUSTO • EB EC2 micro (1GB mem) = $6 / mês • LAMBDA Total compute (sec) = 1440 * (0.2s) = 288 secs Total compute (GB-s) = 1440 * 512MB/1024 = 720 GB-s Monthly compute charges = 720 * $0.00001667 = $0.0120024 Monthly request charges = 1440 * $0.2/M = $0.2 Total = $0.3 / month 1440 reqs/mes (1 req a cada 30 min), duração 200ms, 512MB LAMBDA 95% mais barato
  • 21. COMPARAÇÃO DE CUSTO • EB EC2 small (2GB mem) = $20 / month • LAMBDA Total compute (seconds) = 3M * (0.2s) = 600,000 seconds Total compute (GB-s) = 3M * 512MB/1024 = 1.5M GB-s Monthly compute charges = 1.5M * $0.00001667 = $25 Monthly request charges = 3M * $0.2/M = $0.6 Total = $25.2 / month 3M reqs/month (35 r/s), duration 200ms, 512MB LAMBDA 25% mais caro
  • 22. COMPARAÇÃO DE CUSTO • EB 3x EC2 small (2GB mem) = $60 / month • LAMBDA Total compute (seconds) = 30M * (0.2s) = 6M seconds Total compute (GB-s) = 30M * 512MB/1024 = 15M GB-s Monthly compute charges = 15M * $0.00001667 = $250 Monthly request charges = 30M * $0.2/M = $6 Total = $256 / month 30M reqs/month (350 r/s), duration 200ms, 512MB LAMBDA 420% mais caro
  • 23. COMPARAÇÃO DE CUSTO • EB 10x EC2 small (2GB mem) = $200 / month • LAMBDA Total compute (seconds) = 570M * (0.2s) = 114M seconds Total compute (GB-s) = 570M * 512MB/1024 = 285M GB-s Monthly compute charges = 285M * $0.00001667 = $4750 Monthly request charges = 570M * $0.2/M = $114 Total = $4864 / month api company (situacao em 2020-02) 570M reqs/month (6600 r/s), duration 200ms, 512MB LAMBDA 2300% mais caro
  • 27. DATABASES • Pontos obrigatórios 1. Replicação para outras regiões com baixa latência 2. Serviço gerenciado 3. Baixo custo • Desejáveis 1. NoSQL para evitar migrations 2. Global Write
  • 28. DATABASES MySQL Aurora MongoDB DynamoDB Replicação X X X X Gerenciado X X X X NoSQL X X Global Write +- X Facilidade de uso X X X
  • 30. $ 2,776 / mon
  • 31. $ 870 / mont
  • 33. AUTO SCALING EM AÇÃO

Editor's Notes

  • #15: Permissionamento para deploy libera ec2:* Scaling pode requests por total, não por minuto