SlideShare une entreprise Scribd logo
1  sur  43
Is Lambda Architecture really a
new normal for cloud native apps?
λ
+
:~ whoami:
Antons Kranga
Full stack developer ~ 15years
Cloud Architect
DevOps evangelist
Innovation Center of Accenture Cloud Platform
Speaker
Marathon runner
Motivation
What is Streaming?
We often want to deploy data models based on new data that
continuously arrive from the multiple sources
0
1
0
1
0
10
1
0
1
0
1
0
10
1
Challenges
Users expect data will appear immediately after it arrived
Fault tolerant
Distributed data consistency
Scalability (how not to lose data when scale down)
What is “λ”
0
1
0 10
10
1 00
0
1
110
1
Speed Layer Batch Layer
new data
master
data
realtime
view
Serving Layer
view View View…
map-red
query query
realtime
view
What is “λ” architecture
Batch Layer: Master Data sets and Pre-compute aggregations
• Slow Data Ingestion – minutes to days intervals
• Append-only data sets eventually supersedes data
captured in speed layer
Speed Layer: High throughput, near-real-time data ingestion
• Fast Data Ingestion – seconds interval
• Concurrent information processing
• Retrieval of most recent information
Serving Layer: Provide query capability over the Batch Layer
• Low-latency ad-hoc query
• May also provide assess to speed layer views
Why go Cloud Native?
Cloud Provider Lock-In
Avoid “Yak shaving”
Rely on managed services
devops automation
Lower operating costs
Transparent integration with
other “Cloud Native” services
AWS Blueprint for Lambda Architectures
https://d0.awsstatic.com/whitepapers/lambda-architecure-on-for-batch-aws.pdf
Published at July 2015
Amazon
Kinesis
AmazonKinesis–
enabledapp
S3 buckets
Amazon EMR
speed layer
batch layer
emr on serving
and merging layer
Data services form AWS
Kinesis
aws region
az1 az2 az3
Lambda
S3 storage
Redshift
consumers
EC2 Instance
EMR
producers
Kinesis
producers
aws region
az1 az2 az3
Lambda
S3 storage
Redshift
consumers
EC2 Instance
EMR
AmazonKinesis kinesis = ...
...
PutRecordRequest putRecord = new PutRecordRequest();
putRecord.setStreamName(streamName);
putRecord.setData(ByteBuffer.wrap(bytes));
putRecord.setSequenceNumberForOrdering(null);
...
kinesis.putRecord(putRecord);
Producer
Kinesis
aws region
az1 az2 az3
Lambda
S3 storage
Redshift
consumers
EC2 Instance
EMR
AmazonKinesis kinesis = ...
...
PutRecordRequest putRecord = new PutRecordRequest();
putRecord.setStreamName(streamName);
putRecord.setData(ByteBuffer.wrap(bytes));
putRecord.setSequenceNumberForOrdering(null);
...
kinesis.putRecord(putRecord);
Producer
AmazonKinesisClient kinesisClient = ...
GetShardIteratorRequest req = ...
req.setStreamName("my-kinesis");
req.setShardIteratorType("TRIM_HORIZON");
...
GetRecordsResult result = kinesisClient.getRecords(req);
records = result.getRecords();
for (Record record : records) {
... = record.getData();
}
Consumerproducers
Kinesis streams
What: Enables to build near-real-time data processing
applications
Use cases:
• Real time analytics
• Log files processing
• Reporting
Durability: data streams replicated across 3AZ
Kinesis streams
Cost Model:
Shard Hour:
• 5 read transaction per second
• 2 MB data read per second
• 100 write transactions per second
• 1 MB data write per second
aprox 12.5USD/Mo
Extended data retention
• Up to 7 days
Kinesis streams
Not good when:
• Small scale throughput less than 200KB/sec
• Long term data storage (more than 24H)
Lambda
What: Lambda allows to write function without having actual
server
Use cases:
• Real time Stream processing
• Tiny ETL
• In few cases can replace EC2
• Process IaaS Events
Runtimes: Java8, NodeJS, Python
Backed by: provides /tmp for ephemeral storage.
Durability: No maintenance windows, 3 retries before failure
Lambda
Cost Model:
Requests per function:
• GB/seconds
• Step 100 millisec
• 0.20 USD Mill-Requests; $0.00001667 per GB
Lambda
Not good when:
• Timeout 300 sec (cannot be changed)
• Forces developer to think stateless
• Highly dynamic web-sites.
• Competes with t2.nano ($4.75/month)
S3 storage
SNS
consumers
Kinesis
Lambda
…Lambda
S3 storage
SNS
consumers
Kinesis
…
myApp.
ZIP
Java8
Python
NodeJS
EMR
What: Managed service of Apache Hadoop
Use cases:
• MapRed data processing
• Large data ETL jobs
• Data movement
• Log processing and analytics
Backed by: 1 or cluster of EC2 instances
Durability: on storage level provides by S3
See more:
https://media.amazonwebservices.com/AWS_Amazon_EMR_Best_Practices.pdf
EMR
Cost Model:
• Charges apply per EC2 sizes model
• S3 storage charges applies (0.03 GB/Mo)
EMR
Not good when:
• Small to Medium data sets
• ACID (atomicity, consistency, isolation, durability)
• Competes with RDS: Dynamo DB, Aurora DB
S3
What: Highly fully managed persistent storage
• Static content web sites
• File storage (primarily for reading)
• Archives storage
Backed by: covered by AWS S3 SLA
Durability: storage: 99.999999999%; availability: 99.99%
S3
Cost Model: GB/Mo
• Standard Storage: $0.03 GB/Mo
• Infrequent Access Storage: $0.0125 GB/Mo
• Glacier Storage: $0.007 GB/Mo
S3
Not good when:
• S3 write can be slow
• Glacier can restore up to 5% of storage per months
Redshift
What: Petabytes scale Data Warehouse as managed service
• Data warehouse (OLAP)
• BI and ETL
• Store large historical data
Backed by: AWS provides automatic data backup
Durability: on storage level provides by S3
Scaling: Start with 160GB node and then you can scale
Redshift
Cost Model:
• Charges apply per EC2 sizes model
• S3 storage charges applies (0.03 GB/Mo)
Redshift
Not good when:
• OLTP (On-line transaction processing)
• Unstructured data
• Blob storage
Kinesis
shard
shard
shard
producer
batch layer
speed layerec2
S3 Bucket Map Red
Process Stream
serving layer
View
DynamoDB
Primer Lambda
(every hour)
Kinesis
shard
shard
shard
producer
batch layer
speed layerec2
S3 Bucket Map Red
Process Stream
serving layer
View
DynamoDB
Lambda
(every hour)
computation per hour
Lambda
(every hour)
h0 h1 h2 h3
batch layerSpeed layer
t
Kinesis
shard
shard
shard
producer
batch layer
speed layerfec2
S3 Bucket Map Red
Process Stream
serving layer
View
DynamoDB
Primer Lambda
(every hour)
Lambda
(every hour)
Presentation Layer
JSappLambda
Lesions learned
It is better but not simple
Not everything is automated
Questions?
Thank you!

Contenu connexe

Tendances

AWS Lambda - A quick introduction #advancedaws
AWS Lambda - A quick introduction #advancedawsAWS Lambda - A quick introduction #advancedaws
AWS Lambda - A quick introduction #advancedaws
Chris Richardson
 

Tendances (20)

Building Out Your Kafka Developer CDC Ecosystem
Building Out Your Kafka Developer CDC  EcosystemBuilding Out Your Kafka Developer CDC  Ecosystem
Building Out Your Kafka Developer CDC Ecosystem
 
Serverless and Servicefull Applications - Where Microservices complements Ser...
Serverless and Servicefull Applications - Where Microservices complements Ser...Serverless and Servicefull Applications - Where Microservices complements Ser...
Serverless and Servicefull Applications - Where Microservices complements Ser...
 
Getting Started with ElastiCache for Redis
Getting Started with ElastiCache for RedisGetting Started with ElastiCache for Redis
Getting Started with ElastiCache for Redis
 
Aws atlanta march_2015
Aws atlanta march_2015Aws atlanta march_2015
Aws atlanta march_2015
 
AWS Lambda - A quick introduction #advancedaws
AWS Lambda - A quick introduction #advancedawsAWS Lambda - A quick introduction #advancedaws
AWS Lambda - A quick introduction #advancedaws
 
Building a Serverless Pipeline
Building a Serverless PipelineBuilding a Serverless Pipeline
Building a Serverless Pipeline
 
Managing AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormationManaging AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormation
 
Using amazon web services with cold fusion 11
Using amazon web services with cold fusion 11Using amazon web services with cold fusion 11
Using amazon web services with cold fusion 11
 
Serverless Apps with Open Whisk
Serverless Apps with Open Whisk Serverless Apps with Open Whisk
Serverless Apps with Open Whisk
 
Č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
 
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
 
Serverless cat detector workshop - cloudyna 2017 (16.12.2017)
Serverless cat detector   workshop - cloudyna 2017 (16.12.2017)Serverless cat detector   workshop - cloudyna 2017 (16.12.2017)
Serverless cat detector workshop - cloudyna 2017 (16.12.2017)
 
Automating Application over OpenStack using Workflows
Automating Application over OpenStack using WorkflowsAutomating Application over OpenStack using Workflows
Automating Application over OpenStack using Workflows
 
Orchestrating workflows Apache Airflow on GCP & AWS
Orchestrating workflows Apache Airflow on GCP & AWSOrchestrating workflows Apache Airflow on GCP & AWS
Orchestrating workflows Apache Airflow on GCP & AWS
 
Node Summit 2018 - Optimize your Lambda functions
Node Summit 2018 - Optimize your Lambda functionsNode Summit 2018 - Optimize your Lambda functions
Node Summit 2018 - Optimize your Lambda functions
 
MongoDB .local Bengaluru 2019: Distributed Transactions: With Great Power Com...
MongoDB .local Bengaluru 2019: Distributed Transactions: With Great Power Com...MongoDB .local Bengaluru 2019: Distributed Transactions: With Great Power Com...
MongoDB .local Bengaluru 2019: Distributed Transactions: With Great Power Com...
 
What's new with Apache Camel 3? | DevNation Tech Talk
What's new with Apache Camel 3? | DevNation Tech TalkWhat's new with Apache Camel 3? | DevNation Tech Talk
What's new with Apache Camel 3? | DevNation Tech Talk
 
Building a serverless company on AWS lambda and Serverless framework
Building a serverless company on AWS lambda and Serverless frameworkBuilding a serverless company on AWS lambda and Serverless framework
Building a serverless company on AWS lambda and Serverless framework
 
Introducing Kubernetes
Introducing Kubernetes Introducing Kubernetes
Introducing Kubernetes
 
MongoDB .local Bengaluru 2019: Becoming an Ops Manager Backup Superhero!
MongoDB .local Bengaluru 2019: Becoming an Ops Manager Backup Superhero!MongoDB .local Bengaluru 2019: Becoming an Ops Manager Backup Superhero!
MongoDB .local Bengaluru 2019: Becoming an Ops Manager Backup Superhero!
 

En vedette

En vedette (12)

Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for Developers
 
AWS WAF introduction and live demo - Pop-up Loft Tel Aviv
AWS WAF introduction and live demo - Pop-up Loft Tel AvivAWS WAF introduction and live demo - Pop-up Loft Tel Aviv
AWS WAF introduction and live demo - Pop-up Loft Tel Aviv
 
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Java Day Kharkiv - Next-gen engineering with Docker and KubernetesJava Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile Infrastructures
 
DevTernity - DevOps with smell
DevTernity - DevOps with smellDevTernity - DevOps with smell
DevTernity - DevOps with smell
 
DevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantDevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: Vagrant
 
OpenSlava Infrastructure Automation Patterns
OpenSlava   Infrastructure Automation PatternsOpenSlava   Infrastructure Automation Patterns
OpenSlava Infrastructure Automation Patterns
 
AWS WAF
AWS WAFAWS WAF
AWS WAF
 
A quick introduction to AWS Kinesis
A quick introduction to AWS KinesisA quick introduction to AWS Kinesis
A quick introduction to AWS Kinesis
 
DevOps Hackathon: Session 3 - Test Driven Infrastructure
DevOps Hackathon: Session 3 - Test Driven InfrastructureDevOps Hackathon: Session 3 - Test Driven Infrastructure
DevOps Hackathon: Session 3 - Test Driven Infrastructure
 
OpenSlava 2014 - CloudFoundry inside-out
OpenSlava 2014 - CloudFoundry inside-outOpenSlava 2014 - CloudFoundry inside-out
OpenSlava 2014 - CloudFoundry inside-out
 
Dev ops with smell v1.2
Dev ops with smell v1.2Dev ops with smell v1.2
Dev ops with smell v1.2
 

Similaire à Riga dev day: Lambda architecture at AWS

Similaire à Riga dev day: Lambda architecture at AWS (20)

Real-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS LambdaReal-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS Lambda
 
Log Analysis At Scale
Log Analysis At ScaleLog Analysis At Scale
Log Analysis At Scale
 
AWS Webcast - Managing Big Data in the AWS Cloud_20140924
AWS Webcast - Managing Big Data in the AWS Cloud_20140924AWS Webcast - Managing Big Data in the AWS Cloud_20140924
AWS Webcast - Managing Big Data in the AWS Cloud_20140924
 
Big Data adoption success using AWS Big Data Services - Pop-up Loft TLV 2017
Big Data adoption success using AWS Big Data Services - Pop-up Loft TLV 2017Big Data adoption success using AWS Big Data Services - Pop-up Loft TLV 2017
Big Data adoption success using AWS Big Data Services - Pop-up Loft TLV 2017
 
Real-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS LambdaReal-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS Lambda
 
AWS Analytics
AWS AnalyticsAWS Analytics
AWS Analytics
 
Serverless Architecture Patterns
Serverless Architecture PatternsServerless Architecture Patterns
Serverless Architecture Patterns
 
serverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdfserverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdf
 
Amazon Kinesis Data Streams Vs Msk (1).pptx
Amazon Kinesis Data Streams Vs Msk (1).pptxAmazon Kinesis Data Streams Vs Msk (1).pptx
Amazon Kinesis Data Streams Vs Msk (1).pptx
 
Best of re:Invent
Best of re:InventBest of re:Invent
Best of re:Invent
 
AWS를 활용한 첫 빅데이터 프로젝트 시작하기(김일호)- AWS 웨비나 시리즈 2015
AWS를 활용한 첫 빅데이터 프로젝트 시작하기(김일호)- AWS 웨비나 시리즈 2015AWS를 활용한 첫 빅데이터 프로젝트 시작하기(김일호)- AWS 웨비나 시리즈 2015
AWS를 활용한 첫 빅데이터 프로젝트 시작하기(김일호)- AWS 웨비나 시리즈 2015
 
Getting Started with Real-time Analytics
Getting Started with Real-time AnalyticsGetting Started with Real-time Analytics
Getting Started with Real-time Analytics
 
Real-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS LambdaReal-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS Lambda
 
Choose Right Stream Storage: Amazon Kinesis Data Streams vs MSK
Choose Right Stream Storage: Amazon Kinesis Data Streams vs MSKChoose Right Stream Storage: Amazon Kinesis Data Streams vs MSK
Choose Right Stream Storage: Amazon Kinesis Data Streams vs MSK
 
Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...
Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...
Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...
 
Using Data Lakes
Using Data LakesUsing Data Lakes
Using Data Lakes
 
Deep Dive in Big Data
Deep Dive in Big DataDeep Dive in Big Data
Deep Dive in Big Data
 
AWS Analytics Immersion Day - Build BI System from Scratch (Day1, Day2 Full V...
AWS Analytics Immersion Day - Build BI System from Scratch (Day1, Day2 Full V...AWS Analytics Immersion Day - Build BI System from Scratch (Day1, Day2 Full V...
AWS Analytics Immersion Day - Build BI System from Scratch (Day1, Day2 Full V...
 
Real-Time Event Processing
Real-Time Event ProcessingReal-Time Event Processing
Real-Time Event Processing
 
Real-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS LambdaReal-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS Lambda
 

Dernier

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Dernier (20)

Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 

Riga dev day: Lambda architecture at AWS

  • 1. Is Lambda Architecture really a new normal for cloud native apps? λ +
  • 2. :~ whoami: Antons Kranga Full stack developer ~ 15years Cloud Architect DevOps evangelist Innovation Center of Accenture Cloud Platform Speaker Marathon runner
  • 4. What is Streaming? We often want to deploy data models based on new data that continuously arrive from the multiple sources 0 1 0 1 0 10 1 0 1 0 1 0 10 1
  • 5. Challenges Users expect data will appear immediately after it arrived Fault tolerant Distributed data consistency Scalability (how not to lose data when scale down)
  • 6. What is “λ” 0 1 0 10 10 1 00 0 1 110 1 Speed Layer Batch Layer new data master data realtime view Serving Layer view View View… map-red query query realtime view
  • 7. What is “λ” architecture Batch Layer: Master Data sets and Pre-compute aggregations • Slow Data Ingestion – minutes to days intervals • Append-only data sets eventually supersedes data captured in speed layer Speed Layer: High throughput, near-real-time data ingestion • Fast Data Ingestion – seconds interval • Concurrent information processing • Retrieval of most recent information Serving Layer: Provide query capability over the Batch Layer • Low-latency ad-hoc query • May also provide assess to speed layer views
  • 8. Why go Cloud Native?
  • 11. Rely on managed services
  • 14. Transparent integration with other “Cloud Native” services
  • 15. AWS Blueprint for Lambda Architectures https://d0.awsstatic.com/whitepapers/lambda-architecure-on-for-batch-aws.pdf Published at July 2015 Amazon Kinesis AmazonKinesis– enabledapp S3 buckets Amazon EMR speed layer batch layer emr on serving and merging layer
  • 17. Kinesis aws region az1 az2 az3 Lambda S3 storage Redshift consumers EC2 Instance EMR producers
  • 18. Kinesis producers aws region az1 az2 az3 Lambda S3 storage Redshift consumers EC2 Instance EMR AmazonKinesis kinesis = ... ... PutRecordRequest putRecord = new PutRecordRequest(); putRecord.setStreamName(streamName); putRecord.setData(ByteBuffer.wrap(bytes)); putRecord.setSequenceNumberForOrdering(null); ... kinesis.putRecord(putRecord); Producer
  • 19. Kinesis aws region az1 az2 az3 Lambda S3 storage Redshift consumers EC2 Instance EMR AmazonKinesis kinesis = ... ... PutRecordRequest putRecord = new PutRecordRequest(); putRecord.setStreamName(streamName); putRecord.setData(ByteBuffer.wrap(bytes)); putRecord.setSequenceNumberForOrdering(null); ... kinesis.putRecord(putRecord); Producer AmazonKinesisClient kinesisClient = ... GetShardIteratorRequest req = ... req.setStreamName("my-kinesis"); req.setShardIteratorType("TRIM_HORIZON"); ... GetRecordsResult result = kinesisClient.getRecords(req); records = result.getRecords(); for (Record record : records) { ... = record.getData(); } Consumerproducers
  • 20. Kinesis streams What: Enables to build near-real-time data processing applications Use cases: • Real time analytics • Log files processing • Reporting Durability: data streams replicated across 3AZ
  • 21. Kinesis streams Cost Model: Shard Hour: • 5 read transaction per second • 2 MB data read per second • 100 write transactions per second • 1 MB data write per second aprox 12.5USD/Mo Extended data retention • Up to 7 days
  • 22. Kinesis streams Not good when: • Small scale throughput less than 200KB/sec • Long term data storage (more than 24H)
  • 23. Lambda What: Lambda allows to write function without having actual server Use cases: • Real time Stream processing • Tiny ETL • In few cases can replace EC2 • Process IaaS Events Runtimes: Java8, NodeJS, Python Backed by: provides /tmp for ephemeral storage. Durability: No maintenance windows, 3 retries before failure
  • 24. Lambda Cost Model: Requests per function: • GB/seconds • Step 100 millisec • 0.20 USD Mill-Requests; $0.00001667 per GB
  • 25. Lambda Not good when: • Timeout 300 sec (cannot be changed) • Forces developer to think stateless • Highly dynamic web-sites. • Competes with t2.nano ($4.75/month)
  • 27. EMR What: Managed service of Apache Hadoop Use cases: • MapRed data processing • Large data ETL jobs • Data movement • Log processing and analytics Backed by: 1 or cluster of EC2 instances Durability: on storage level provides by S3 See more: https://media.amazonwebservices.com/AWS_Amazon_EMR_Best_Practices.pdf
  • 28. EMR Cost Model: • Charges apply per EC2 sizes model • S3 storage charges applies (0.03 GB/Mo)
  • 29. EMR Not good when: • Small to Medium data sets • ACID (atomicity, consistency, isolation, durability) • Competes with RDS: Dynamo DB, Aurora DB
  • 30. S3 What: Highly fully managed persistent storage • Static content web sites • File storage (primarily for reading) • Archives storage Backed by: covered by AWS S3 SLA Durability: storage: 99.999999999%; availability: 99.99%
  • 31. S3 Cost Model: GB/Mo • Standard Storage: $0.03 GB/Mo • Infrequent Access Storage: $0.0125 GB/Mo • Glacier Storage: $0.007 GB/Mo
  • 32. S3 Not good when: • S3 write can be slow • Glacier can restore up to 5% of storage per months
  • 33. Redshift What: Petabytes scale Data Warehouse as managed service • Data warehouse (OLAP) • BI and ETL • Store large historical data Backed by: AWS provides automatic data backup Durability: on storage level provides by S3 Scaling: Start with 160GB node and then you can scale
  • 34. Redshift Cost Model: • Charges apply per EC2 sizes model • S3 storage charges applies (0.03 GB/Mo)
  • 35. Redshift Not good when: • OLTP (On-line transaction processing) • Unstructured data • Blob storage
  • 36. Kinesis shard shard shard producer batch layer speed layerec2 S3 Bucket Map Red Process Stream serving layer View DynamoDB Primer Lambda (every hour)
  • 37. Kinesis shard shard shard producer batch layer speed layerec2 S3 Bucket Map Red Process Stream serving layer View DynamoDB Lambda (every hour) computation per hour Lambda (every hour) h0 h1 h2 h3 batch layerSpeed layer t
  • 38. Kinesis shard shard shard producer batch layer speed layerfec2 S3 Bucket Map Red Process Stream serving layer View DynamoDB Primer Lambda (every hour) Lambda (every hour) Presentation Layer JSappLambda
  • 40. It is better but not simple
  • 41. Not everything is automated