SlideShare a Scribd company logo
1 of 35
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
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.”
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

More Related Content

What's hot

A brief introduction to CloudFormation
A brief introduction to CloudFormationA brief introduction to CloudFormation
A brief introduction to CloudFormationSWIFTotter Solutions
 
20160929 serverless-conf-osaka
20160929 serverless-conf-osaka20160929 serverless-conf-osaka
20160929 serverless-conf-osakaShogo Muranushi
 
Amazon WebServices lection 1
Amazon WebServices lection 1Amazon WebServices lection 1
Amazon WebServices lection 1Binary 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 ServiceTamir Dresher
 
Adopting serverless
Adopting serverlessAdopting serverless
Adopting serverlessGayan Hewa
 
Aws Fargate clusterless serverless
Aws Fargate clusterless serverlessAws Fargate clusterless serverless
Aws Fargate clusterless serverlessRodrigo 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 - Nerdearla2016Sebastian Montini
 
Amazon Webservice & Cloud Computing
Amazon Webservice & Cloud ComputingAmazon Webservice & Cloud Computing
Amazon Webservice & Cloud ComputingJack Smith
 
The future of cloud programming
The future of cloud programmingThe future of cloud programming
The future of cloud programmingJason Straughan
 
20160916 aws premier-night-v2-public
20160916 aws premier-night-v2-public20160916 aws premier-night-v2-public
20160916 aws premier-night-v2-publicShogo 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 orchestrationSlobodan Utvić
 
Cloud service-definition
Cloud service-definitionCloud service-definition
Cloud service-definitionNaveen Joy
 
Serverless Framework (2018)
Serverless Framework (2018)Serverless Framework (2018)
Serverless Framework (2018)Rowell Belen
 

What's hot (20)

A brief introduction to CloudFormation
A brief introduction to CloudFormationA brief introduction to CloudFormation
A brief introduction to CloudFormation
 
20160929 serverless-conf-osaka
20160929 serverless-conf-osaka20160929 serverless-conf-osaka
20160929 serverless-conf-osaka
 
Amazon WebServices lection 1
Amazon WebServices lection 1Amazon WebServices lection 1
Amazon WebServices lection 1
 
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
 
Adopting serverless
Adopting serverlessAdopting serverless
Adopting serverless
 
Aws Fargate clusterless serverless
Aws Fargate clusterless serverlessAws Fargate clusterless serverless
Aws Fargate clusterless serverless
 
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)
 
AWS systems manager | Francisco edilton
AWS systems manager | Francisco edilton  AWS systems manager | Francisco edilton
AWS systems manager | Francisco edilton
 
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
 
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
 
Amazon Webservice & Cloud Computing
Amazon Webservice & Cloud ComputingAmazon Webservice & Cloud Computing
Amazon Webservice & Cloud Computing
 
The future of cloud programming
The future of cloud programmingThe future of cloud programming
The future of cloud programming
 
20160916 aws premier-night-v2-public
20160916 aws premier-night-v2-public20160916 aws premier-night-v2-public
20160916 aws premier-night-v2-public
 
104 meets cloud
104 meets cloud104 meets cloud
104 meets cloud
 
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 guerrilla orchestration
AWS guerrilla orchestrationAWS guerrilla orchestration
AWS guerrilla orchestration
 
Cloud service-definition
Cloud service-definitionCloud service-definition
Cloud service-definition
 
Dray
DrayDray
Dray
 
Practical Cloud
Practical CloudPractical Cloud
Practical Cloud
 
Serverless Framework (2018)
Serverless Framework (2018)Serverless Framework (2018)
Serverless Framework (2018)
 

Similar to Escalabilidade com Lambda e Elastic Beanstalk – Parte I

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 IBMRightScale
 
Deploying microservices on AWS
Deploying microservices on AWSDeploying microservices on AWS
Deploying microservices on AWSMichael Haberman
 
Serverless applications
Serverless applicationsServerless applications
Serverless applicationsmbaric
 
使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理Amazon Web Services
 
Serverless Architectures on AWS Lambda
Serverless Architectures on AWS LambdaServerless Architectures on AWS Lambda
Serverless Architectures on AWS LambdaSerhat Can
 
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
 Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T... Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...Amazon Web Services
 
From Serverless to InterCloud
From Serverless to InterCloudFrom Serverless to InterCloud
From Serverless to InterCloudWayne Scarano
 
Building Serverless Web Applications - DevDay Austin 2017
Building Serverless Web Applications - DevDay Austin 2017Building Serverless Web Applications - DevDay Austin 2017
Building Serverless Web Applications - DevDay Austin 2017Amazon Web Services
 
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 architecturesLaurent Bernaille
 
Migrating the GoPro Plus Cloud Service to Amazon ECS
Migrating the GoPro Plus Cloud Service to Amazon ECSMigrating the GoPro Plus Cloud Service to Amazon ECS
Migrating the GoPro Plus Cloud Service to Amazon ECSAmazon Web Services
 
Raleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshopRaleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshopAmazon Web Services
 
AWS Serverless solution for developers
AWS Serverless solution for developersAWS Serverless solution for developers
AWS Serverless solution for developersMichael Haberman
 
What's New on AWS and What it Means to You
What's New on AWS and What it Means to YouWhat's New on AWS and What it Means to You
What's New on AWS and What it Means to YouAmazon Web Services
 
Getting Started with AWS Compute Services
Getting Started with AWS Compute ServicesGetting Started with AWS Compute Services
Getting Started with AWS Compute ServicesAmazon Web Services
 
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 Editionecobold
 
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 AWSBrett McLain
 
Building Serverless Web Applications - DevDay Los Angeles 2017
Building Serverless Web Applications - DevDay Los Angeles 2017Building Serverless Web Applications - DevDay Los Angeles 2017
Building Serverless Web Applications - DevDay Los Angeles 2017Amazon Web Services
 
AWS for the Java Developer
AWS for the Java DeveloperAWS for the Java Developer
AWS for the Java DeveloperRory 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 2019John McCormack
 

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
 
Deploying microservices on AWS
Deploying microservices on AWSDeploying microservices on AWS
Deploying microservices on AWS
 
Serverless applications
Serverless applicationsServerless applications
Serverless applications
 
使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理
 
Serverless Architectures on AWS Lambda
Serverless Architectures on AWS LambdaServerless Architectures on AWS Lambda
Serverless Architectures on AWS Lambda
 
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
 Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T... Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
 
From Serverless to InterCloud
From Serverless to InterCloudFrom Serverless to InterCloud
From Serverless to InterCloud
 
Building Serverless Web Applications - DevDay Austin 2017
Building Serverless Web Applications - DevDay Austin 2017Building Serverless Web Applications - DevDay Austin 2017
Building Serverless Web Applications - DevDay Austin 2017
 
AWS Lambda Presentation (Tech Talk DC)
AWS Lambda Presentation (Tech Talk DC)AWS Lambda Presentation (Tech Talk DC)
AWS Lambda Presentation (Tech Talk DC)
 
Operational challenges behind Serverless architectures
Operational challenges behind Serverless architecturesOperational challenges behind Serverless architectures
Operational challenges behind Serverless architectures
 
Migrating the GoPro Plus Cloud Service to Amazon ECS
Migrating the GoPro Plus Cloud Service to Amazon ECSMigrating the GoPro Plus Cloud Service to Amazon ECS
Migrating the GoPro Plus Cloud Service to Amazon ECS
 
Raleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshopRaleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshop
 
AWS Serverless solution for developers
AWS Serverless solution for developersAWS Serverless solution for developers
AWS Serverless solution for developers
 
What's New on AWS and What it Means to You
What's New on AWS and What it Means to YouWhat's New on AWS and What it Means to You
What's New on AWS and What it Means to You
 
Getting Started with AWS Compute Services
Getting Started with AWS Compute ServicesGetting Started with AWS Compute Services
Getting Started with AWS Compute Services
 
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
 
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
 
Building Serverless Web Applications - DevDay Los Angeles 2017
Building Serverless Web Applications - DevDay Los Angeles 2017Building Serverless Web Applications - DevDay Los Angeles 2017
Building Serverless Web Applications - DevDay Los Angeles 2017
 
AWS for the Java Developer
AWS for the Java DeveloperAWS for the Java Developer
AWS for the Java Developer
 
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
 

Recently uploaded

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 

Recently uploaded (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 

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.”
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 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.”
  • 16.
  • 17.
  • 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

  1. Permissionamento para deploy libera ec2:* Scaling pode requests por total, não por minuto