SlideShare a Scribd company logo
1 of 29
Operational challenges behind
Serverless architectures
16 Mai 2017 - AWS User group
Who am I?
Laurent Bernaille @d2si
• OPS background
• Cloud enthousiast
• Opensource advocate
• Love discovering, building (and breaking…) new things
• Passionate about the ongoing IT transformations
@lbernail
About this talk
About this talk
Agenda
• Observability
• Challenges with event based architecture
• Understanding new services
• Security
• Continuous Delivery
Observability
Monitoring: how do I monitor my functions?
• Are my functions behaving well?
• Where is my New Relic?
• Where is my Datadog?
Monitoring: for lambda, we can use cloudwatch!
Invocations/mn
Average duration
• Simple application: <20 lambdas
• Is this normal? What about trends? What about scale?
• What about user experience?
Monitoring: What about errors?
Errors
Are these errors "normal"?
What kind of errors?
• Code errors?
• Execution errors (out of memory? out of time?)
• Lambda runtime error (can they happen?)
Are they related to retries?
Logging: what are the cause for errors / latency?
• Lambda logs console/logger outputs
• Logs are in Cloudwatch logs
One Log group per function, nice!
One Log stream per?
Crazy amount of logs (only from lambda engine here)
> Requires careful configuration
> AND appropriate tools
Logging: needle in a haystack
Tracing: where is my function taking time?
• No off-the-shelf APM solution (yet)
• Current State-of-the-art: manual tracing
Challenges with event based architecture
Snowball effects
Let's write a function that reacts to writes on s3
• do a transformation
• writes the result on s3
Guess what happens?
Poison messages
Kinesis streamDynamo DB
Kinesis guarantees in-order delivery
What will happen now?
Latency
Lambdas can be very fast
• < 10ms for simple treatments
• What happens when we call many lambdas? Latency sums up
• Is this fast enough?
- Paris-London, one-way 4-5ms
- redis local latency? < 100us
- simple operation on CPU? < 10ns
• Being fast is important, but on the other side, billing is per 100ms
Warm-up times
• First run of a lambda is *much* slower (100s ms)
> Even slower in some cases (lambda in a VPC which requires an ENI)
• Lambdas are rescheduled regularly (every few hours) => new cold-start
• What about new version of the code?
Asynchronicity
Event processing is asynchronous, which can have side-effects
• Race conditions
• Inconsistent states
> Applications must take this into account
Understanding new services
Lambda
Warm-up and rescheduling
Limits and throttling
• By default Lambda is limited to 100 concurrent executions (now 1000!)
• For a 100ms function, it means 1000 invocations/s (now 10000/s)
• No metric for concurrent executions
- Look at throttling
- Estimate concurrency based on function duration / number of calls
Event source behavior / configuration
• One event at a time or batching
• Retries
• Dead-Letter queues
Other managed services
New services
• Serverless applications (usually) don't use RDBMS
• Serverless applications (usually) don't use classic messaging technologies
Scalability
• Scaling up / down needs to be automated
• Not always simple
New services => New expertise
• DynamoDB
- table and index design
- read / write capacity estimation
- optimize performance *and *costs
• Kinesis
- sharding for multiplexing and scalability
- when to reshard / merge shards?
Security
Security
Serverless helps with security
• No Operating System to manage
• No application runtime to manage
• Limited attack surface (short function)
• Short lifespan (<5mn for function, up to 6h for container)
And others are sometimes trickier
• Many external services to secure (SAAS, managed services)
• AWS permissions
But some things don't change
• Code security
• Frameworks
• 3rd party dependancies
Continuous Delivery
Continous integration
Testing is not easy
• How do I replicate Lambda in my CI environment?
• Will I use AWS services for unit testing?
• What about mocking?
Local deployment is helpflul to iterate fast
• How do I replicate Lambda locally?
• How can I simulate AWS services?
- "Easy" for some (many dynamoDB implementations)
- Much harder for some complex integration (DynamoDB streams for instance?)
- Several projects working on this (localstack)
Packaging and versioning
Managing versioning
• Easy for the code
• Lambda can be versioned in AWS
Most frameworks are designed to push from local machine
• Build the code, get dependencies, push
• Can be duplicated in CI
• But no real artifact that can be shared
Deploying the same version across environments?
Is there a deployment "artifact" I can share
- across environements
- across AWS accounts (Prod / Staging)
- with all the dependencies built-in
What is an application?
Is it a single function?
• Deployed independently
• Versioned independently
> What about shared libraries between functions?
The answer is probably somewhere in the middle
• No clear best practice yet
• Trial and error
Is it all my functions?
• Versioned as a whole
• With bundled shared libraries
• Same artifact with different handlers
• Deployed together or independently?
> Functions and dependencies can sum up to a big artifact (Megabytes)
Conclusion
Conclusion
Serverless is the future (or a big part of it)
• Focus on business logic that matters
• Much simpler applications
• Really pay for what you use
Serverless creates many new challenges
• How can we adapt standard code best practices?
• How do operate these new applications?
From NoOPS to NewOPS
• No longer sysadmins or netadmins
• Supervision remains similar but requires new tools
• A big focus on new architectures and new backends
• Optimize for performance and costs
Questions?
Thank you
@lbernail

More Related Content

What's hot

Aws + kubernetes = ❤︎
Aws + kubernetes = ❤︎Aws + kubernetes = ❤︎
Aws + kubernetes = ❤︎Anthony Stanton
 
beSharp a serverless approach to big data on aws
beSharp a serverless approach to big data on awsbeSharp a serverless approach to big data on aws
beSharp a serverless approach to big data on awsClaudio Pontili
 
Microsoft Azure IaaS and Terraform
Microsoft Azure IaaS and TerraformMicrosoft Azure IaaS and Terraform
Microsoft Azure IaaS and TerraformAlex Mags
 
From Docker Straight to AWS
From Docker Straight to AWSFrom Docker Straight to AWS
From Docker Straight to AWSDevOps.com
 
Serverless Reality
Serverless RealityServerless Reality
Serverless RealityLynn Langit
 
What We Learned From Building a Modern Messaging and Streaming System for Cloud
What We Learned From Building a Modern Messaging and Streaming System for CloudWhat We Learned From Building a Modern Messaging and Streaming System for Cloud
What We Learned From Building a Modern Messaging and Streaming System for CloudStreamNative
 
Real World AWS Deployment With Boto, Fabric, and Cloud Formation
Real World AWS Deployment With Boto, Fabric, and Cloud FormationReal World AWS Deployment With Boto, Fabric, and Cloud Formation
Real World AWS Deployment With Boto, Fabric, and Cloud FormationDixon Whitmire
 
Serverless log analytics with Amazon Kinesis
Serverless log analytics with Amazon KinesisServerless log analytics with Amazon Kinesis
Serverless log analytics with Amazon KinesisRob Greenwood
 
Getting Started with Docker on AWS - DevDay Los Angeles 2017
Getting Started with Docker on AWS - DevDay Los Angeles 2017Getting Started with Docker on AWS - DevDay Los Angeles 2017
Getting Started with Docker on AWS - DevDay Los Angeles 2017Amazon Web Services
 
Batch Processing with Amazon EC2 Container Service
Batch Processing with Amazon EC2 Container ServiceBatch Processing with Amazon EC2 Container Service
Batch Processing with Amazon EC2 Container ServiceAmazon Web Services
 
Keystone - ApacheCon 2016
Keystone - ApacheCon 2016Keystone - ApacheCon 2016
Keystone - ApacheCon 2016Peter Bakas
 
Keystone - Leverage Big Data 2016
Keystone - Leverage Big Data 2016Keystone - Leverage Big Data 2016
Keystone - Leverage Big Data 2016Peter Bakas
 
Cloudformation vs terraform_vs_ansible
Cloudformation vs terraform_vs_ansibleCloudformation vs terraform_vs_ansible
Cloudformation vs terraform_vs_ansibleGeert Theys
 
Ford's AWS Service Update - March 2020 (Richmond AWS User Group)
Ford's AWS Service Update - March 2020 (Richmond AWS User Group)Ford's AWS Service Update - March 2020 (Richmond AWS User Group)
Ford's AWS Service Update - March 2020 (Richmond AWS User Group)Ford Prior
 
Express apps on AWS Lambda
Express apps on AWS LambdaExpress apps on AWS Lambda
Express apps on AWS LambdaMarian Rusnak
 
DevOps in real life
DevOps in real lifeDevOps in real life
DevOps in real lifeDataArt
 
AWS to Bare Metal: Motivation, Pitfalls, and Results
AWS to Bare Metal: Motivation, Pitfalls, and ResultsAWS to Bare Metal: Motivation, Pitfalls, and Results
AWS to Bare Metal: Motivation, Pitfalls, and ResultsMongoDB
 

What's hot (20)

Aws + kubernetes = ❤︎
Aws + kubernetes = ❤︎Aws + kubernetes = ❤︎
Aws + kubernetes = ❤︎
 
beSharp a serverless approach to big data on aws
beSharp a serverless approach to big data on awsbeSharp a serverless approach to big data on aws
beSharp a serverless approach to big data on aws
 
Microsoft Azure IaaS and Terraform
Microsoft Azure IaaS and TerraformMicrosoft Azure IaaS and Terraform
Microsoft Azure IaaS and Terraform
 
From Docker Straight to AWS
From Docker Straight to AWSFrom Docker Straight to AWS
From Docker Straight to AWS
 
Terraform
TerraformTerraform
Terraform
 
Serverless Reality
Serverless RealityServerless Reality
Serverless Reality
 
What We Learned From Building a Modern Messaging and Streaming System for Cloud
What We Learned From Building a Modern Messaging and Streaming System for CloudWhat We Learned From Building a Modern Messaging and Streaming System for Cloud
What We Learned From Building a Modern Messaging and Streaming System for Cloud
 
Real World AWS Deployment With Boto, Fabric, and Cloud Formation
Real World AWS Deployment With Boto, Fabric, and Cloud FormationReal World AWS Deployment With Boto, Fabric, and Cloud Formation
Real World AWS Deployment With Boto, Fabric, and Cloud Formation
 
Serverless log analytics with Amazon Kinesis
Serverless log analytics with Amazon KinesisServerless log analytics with Amazon Kinesis
Serverless log analytics with Amazon Kinesis
 
DevOpsCon Cloud Workshop
DevOpsCon Cloud Workshop DevOpsCon Cloud Workshop
DevOpsCon Cloud Workshop
 
Getting Started with Docker on AWS - DevDay Los Angeles 2017
Getting Started with Docker on AWS - DevDay Los Angeles 2017Getting Started with Docker on AWS - DevDay Los Angeles 2017
Getting Started with Docker on AWS - DevDay Los Angeles 2017
 
Batch Processing with Amazon EC2 Container Service
Batch Processing with Amazon EC2 Container ServiceBatch Processing with Amazon EC2 Container Service
Batch Processing with Amazon EC2 Container Service
 
Keystone - ApacheCon 2016
Keystone - ApacheCon 2016Keystone - ApacheCon 2016
Keystone - ApacheCon 2016
 
Sas 2015 event_driven
Sas 2015 event_drivenSas 2015 event_driven
Sas 2015 event_driven
 
Keystone - Leverage Big Data 2016
Keystone - Leverage Big Data 2016Keystone - Leverage Big Data 2016
Keystone - Leverage Big Data 2016
 
Cloudformation vs terraform_vs_ansible
Cloudformation vs terraform_vs_ansibleCloudformation vs terraform_vs_ansible
Cloudformation vs terraform_vs_ansible
 
Ford's AWS Service Update - March 2020 (Richmond AWS User Group)
Ford's AWS Service Update - March 2020 (Richmond AWS User Group)Ford's AWS Service Update - March 2020 (Richmond AWS User Group)
Ford's AWS Service Update - March 2020 (Richmond AWS User Group)
 
Express apps on AWS Lambda
Express apps on AWS LambdaExpress apps on AWS Lambda
Express apps on AWS Lambda
 
DevOps in real life
DevOps in real lifeDevOps in real life
DevOps in real life
 
AWS to Bare Metal: Motivation, Pitfalls, and Results
AWS to Bare Metal: Motivation, Pitfalls, and ResultsAWS to Bare Metal: Motivation, Pitfalls, and Results
AWS to Bare Metal: Motivation, Pitfalls, and Results
 

Similar to Operational challenges behind Serverless architectures

Operationnal challenges behind Serverless architectures by Laurent Bernaille
Operationnal challenges behind Serverless architectures by Laurent BernailleOperationnal challenges behind Serverless architectures by Laurent Bernaille
Operationnal challenges behind Serverless architectures by Laurent BernailleThe Incredible Automation Day
 
Serverless Architectures on AWS Lambda
Serverless Architectures on AWS LambdaServerless Architectures on AWS Lambda
Serverless Architectures on AWS LambdaSerhat Can
 
Serverless applications
Serverless applicationsServerless applications
Serverless applicationsmbaric
 
Serverless at Lifestage
Serverless at LifestageServerless at Lifestage
Serverless at LifestageBATbern
 
What's New in AWS Serverless and Containers
What's New in AWS Serverless and ContainersWhat's New in AWS Serverless and Containers
What's New in AWS Serverless and ContainersAmazon Web Services
 
(ARC309) Getting to Microservices: Cloud Architecture Patterns
(ARC309) Getting to Microservices: Cloud Architecture Patterns(ARC309) Getting to Microservices: Cloud Architecture Patterns
(ARC309) Getting to Microservices: Cloud Architecture PatternsAmazon Web Services
 
Serverless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsServerless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsTensult
 
Jeremy Edberg (MinOps ) - How to build a solid infrastructure for a startup t...
Jeremy Edberg (MinOps ) - How to build a solid infrastructure for a startup t...Jeremy Edberg (MinOps ) - How to build a solid infrastructure for a startup t...
Jeremy Edberg (MinOps ) - How to build a solid infrastructure for a startup t...Startupfest
 
NDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design PatternsNDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design PatternsRyan Green
 
IT Talk «Microservices & Serverless Architectures», Alexander Chichenin (Solu...
IT Talk «Microservices & Serverless Architectures», Alexander Chichenin (Solu...IT Talk «Microservices & Serverless Architectures», Alexander Chichenin (Solu...
IT Talk «Microservices & Serverless Architectures», Alexander Chichenin (Solu...DataArt
 
Serverless Computing Model
Serverless Computing ModelServerless Computing Model
Serverless Computing ModelMohamed Samir
 
How Serverless Changes DevOps
How Serverless Changes DevOpsHow Serverless Changes DevOps
How Serverless Changes DevOpsRichard Donkin
 
Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services ArchitectureRanjan Baisak
 
Journey towards serverless infrastructure
Journey towards serverless infrastructureJourney towards serverless infrastructure
Journey towards serverless infrastructureVille Seppänen
 
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...Amazon 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
 
使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理Amazon Web Services
 

Similar to Operational challenges behind Serverless architectures (20)

Operationnal challenges behind Serverless architectures by Laurent Bernaille
Operationnal challenges behind Serverless architectures by Laurent BernailleOperationnal challenges behind Serverless architectures by Laurent Bernaille
Operationnal challenges behind Serverless architectures by Laurent Bernaille
 
Serverless Architectures on AWS Lambda
Serverless Architectures on AWS LambdaServerless Architectures on AWS Lambda
Serverless Architectures on AWS Lambda
 
Serverless applications
Serverless applicationsServerless applications
Serverless applications
 
Serverless at Lifestage
Serverless at LifestageServerless at Lifestage
Serverless at Lifestage
 
What's New in AWS Serverless and Containers
What's New in AWS Serverless and ContainersWhat's New in AWS Serverless and Containers
What's New in AWS Serverless and Containers
 
(ARC309) Getting to Microservices: Cloud Architecture Patterns
(ARC309) Getting to Microservices: Cloud Architecture Patterns(ARC309) Getting to Microservices: Cloud Architecture Patterns
(ARC309) Getting to Microservices: Cloud Architecture Patterns
 
Serverless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsServerless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloads
 
Jeremy Edberg (MinOps ) - How to build a solid infrastructure for a startup t...
Jeremy Edberg (MinOps ) - How to build a solid infrastructure for a startup t...Jeremy Edberg (MinOps ) - How to build a solid infrastructure for a startup t...
Jeremy Edberg (MinOps ) - How to build a solid infrastructure for a startup t...
 
NDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design PatternsNDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design Patterns
 
IT Talk «Microservices & Serverless Architectures», Alexander Chichenin (Solu...
IT Talk «Microservices & Serverless Architectures», Alexander Chichenin (Solu...IT Talk «Microservices & Serverless Architectures», Alexander Chichenin (Solu...
IT Talk «Microservices & Serverless Architectures», Alexander Chichenin (Solu...
 
Serverless Computing Model
Serverless Computing ModelServerless Computing Model
Serverless Computing Model
 
Spring in the Cloud
Spring in the CloudSpring in the Cloud
Spring in the Cloud
 
How Serverless Changes DevOps
How Serverless Changes DevOpsHow Serverless Changes DevOps
How Serverless Changes DevOps
 
Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services Architecture
 
Journey towards serverless infrastructure
Journey towards serverless infrastructureJourney towards serverless infrastructure
Journey towards serverless infrastructure
 
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
 
AWS Lambda Presentation (Tech Talk DC)
AWS Lambda Presentation (Tech Talk DC)AWS Lambda Presentation (Tech Talk DC)
AWS Lambda Presentation (Tech Talk DC)
 
使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理
 
Serverless Node.js
Serverless Node.jsServerless Node.js
Serverless Node.js
 
Cloud patterns
Cloud patternsCloud patterns
Cloud patterns
 

More from Laurent Bernaille

How the OOM Killer Deleted My Namespace
How the OOM Killer Deleted My NamespaceHow the OOM Killer Deleted My Namespace
How the OOM Killer Deleted My NamespaceLaurent Bernaille
 
Kubernetes DNS Horror Stories
Kubernetes DNS Horror StoriesKubernetes DNS Horror Stories
Kubernetes DNS Horror StoriesLaurent Bernaille
 
Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)Laurent Bernaille
 
Making the most out of kubernetes audit logs
Making the most out of kubernetes audit logsMaking the most out of kubernetes audit logs
Making the most out of kubernetes audit logsLaurent Bernaille
 
Kubernetes the Very Hard Way. Velocity Berlin 2019
Kubernetes the Very Hard Way. Velocity Berlin 2019Kubernetes the Very Hard Way. Velocity Berlin 2019
Kubernetes the Very Hard Way. Velocity Berlin 2019Laurent Bernaille
 
Kubernetes the Very Hard Way. Lisa Portland 2019
Kubernetes the Very Hard Way. Lisa Portland 2019Kubernetes the Very Hard Way. Lisa Portland 2019
Kubernetes the Very Hard Way. Lisa Portland 2019Laurent Bernaille
 
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you! ...
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you! ...10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you! ...
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you! ...Laurent Bernaille
 
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you!
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you!10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you!
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you!Laurent Bernaille
 
Optimizing kubernetes networking
Optimizing kubernetes networkingOptimizing kubernetes networking
Optimizing kubernetes networkingLaurent Bernaille
 
Kubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard wayKubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard wayLaurent Bernaille
 
Deep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay NetworksDeep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay NetworksLaurent Bernaille
 
Deeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksDeeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksLaurent Bernaille
 
Deep dive in Docker Overlay Networks
Deep dive in Docker Overlay NetworksDeep dive in Docker Overlay Networks
Deep dive in Docker Overlay NetworksLaurent Bernaille
 
Early recognition of encryted applications
Early recognition of encryted applicationsEarly recognition of encryted applications
Early recognition of encryted applicationsLaurent Bernaille
 
Early application identification. CONEXT 2006
Early application identification. CONEXT 2006Early application identification. CONEXT 2006
Early application identification. CONEXT 2006Laurent Bernaille
 

More from Laurent Bernaille (16)

How the OOM Killer Deleted My Namespace
How the OOM Killer Deleted My NamespaceHow the OOM Killer Deleted My Namespace
How the OOM Killer Deleted My Namespace
 
Kubernetes DNS Horror Stories
Kubernetes DNS Horror StoriesKubernetes DNS Horror Stories
Kubernetes DNS Horror Stories
 
Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)
 
Making the most out of kubernetes audit logs
Making the most out of kubernetes audit logsMaking the most out of kubernetes audit logs
Making the most out of kubernetes audit logs
 
Kubernetes the Very Hard Way. Velocity Berlin 2019
Kubernetes the Very Hard Way. Velocity Berlin 2019Kubernetes the Very Hard Way. Velocity Berlin 2019
Kubernetes the Very Hard Way. Velocity Berlin 2019
 
Kubernetes the Very Hard Way. Lisa Portland 2019
Kubernetes the Very Hard Way. Lisa Portland 2019Kubernetes the Very Hard Way. Lisa Portland 2019
Kubernetes the Very Hard Way. Lisa Portland 2019
 
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you! ...
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you! ...10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you! ...
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you! ...
 
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you!
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you!10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you!
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you!
 
Optimizing kubernetes networking
Optimizing kubernetes networkingOptimizing kubernetes networking
Optimizing kubernetes networking
 
Kubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard wayKubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard way
 
Deep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay NetworksDeep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay Networks
 
Deeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksDeeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay Networks
 
Discovering OpenBSD on AWS
Discovering OpenBSD on AWSDiscovering OpenBSD on AWS
Discovering OpenBSD on AWS
 
Deep dive in Docker Overlay Networks
Deep dive in Docker Overlay NetworksDeep dive in Docker Overlay Networks
Deep dive in Docker Overlay Networks
 
Early recognition of encryted applications
Early recognition of encryted applicationsEarly recognition of encryted applications
Early recognition of encryted applications
 
Early application identification. CONEXT 2006
Early application identification. CONEXT 2006Early application identification. CONEXT 2006
Early application identification. CONEXT 2006
 

Recently uploaded

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI 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 | Delhi
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
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...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Operational challenges behind Serverless architectures

  • 1. Operational challenges behind Serverless architectures 16 Mai 2017 - AWS User group
  • 2. Who am I? Laurent Bernaille @d2si • OPS background • Cloud enthousiast • Opensource advocate • Love discovering, building (and breaking…) new things • Passionate about the ongoing IT transformations @lbernail
  • 5. Agenda • Observability • Challenges with event based architecture • Understanding new services • Security • Continuous Delivery
  • 7. Monitoring: how do I monitor my functions? • Are my functions behaving well? • Where is my New Relic? • Where is my Datadog?
  • 8. Monitoring: for lambda, we can use cloudwatch! Invocations/mn Average duration • Simple application: <20 lambdas • Is this normal? What about trends? What about scale? • What about user experience?
  • 9. Monitoring: What about errors? Errors Are these errors "normal"? What kind of errors? • Code errors? • Execution errors (out of memory? out of time?) • Lambda runtime error (can they happen?) Are they related to retries?
  • 10. Logging: what are the cause for errors / latency? • Lambda logs console/logger outputs • Logs are in Cloudwatch logs One Log group per function, nice! One Log stream per?
  • 11. Crazy amount of logs (only from lambda engine here) > Requires careful configuration > AND appropriate tools Logging: needle in a haystack
  • 12. Tracing: where is my function taking time? • No off-the-shelf APM solution (yet) • Current State-of-the-art: manual tracing
  • 13. Challenges with event based architecture
  • 14. Snowball effects Let's write a function that reacts to writes on s3 • do a transformation • writes the result on s3 Guess what happens?
  • 15. Poison messages Kinesis streamDynamo DB Kinesis guarantees in-order delivery What will happen now?
  • 16. Latency Lambdas can be very fast • < 10ms for simple treatments • What happens when we call many lambdas? Latency sums up • Is this fast enough? - Paris-London, one-way 4-5ms - redis local latency? < 100us - simple operation on CPU? < 10ns • Being fast is important, but on the other side, billing is per 100ms Warm-up times • First run of a lambda is *much* slower (100s ms) > Even slower in some cases (lambda in a VPC which requires an ENI) • Lambdas are rescheduled regularly (every few hours) => new cold-start • What about new version of the code?
  • 17. Asynchronicity Event processing is asynchronous, which can have side-effects • Race conditions • Inconsistent states > Applications must take this into account
  • 19. Lambda Warm-up and rescheduling Limits and throttling • By default Lambda is limited to 100 concurrent executions (now 1000!) • For a 100ms function, it means 1000 invocations/s (now 10000/s) • No metric for concurrent executions - Look at throttling - Estimate concurrency based on function duration / number of calls Event source behavior / configuration • One event at a time or batching • Retries • Dead-Letter queues
  • 20. Other managed services New services • Serverless applications (usually) don't use RDBMS • Serverless applications (usually) don't use classic messaging technologies Scalability • Scaling up / down needs to be automated • Not always simple New services => New expertise • DynamoDB - table and index design - read / write capacity estimation - optimize performance *and *costs • Kinesis - sharding for multiplexing and scalability - when to reshard / merge shards?
  • 22. Security Serverless helps with security • No Operating System to manage • No application runtime to manage • Limited attack surface (short function) • Short lifespan (<5mn for function, up to 6h for container) And others are sometimes trickier • Many external services to secure (SAAS, managed services) • AWS permissions But some things don't change • Code security • Frameworks • 3rd party dependancies
  • 24. Continous integration Testing is not easy • How do I replicate Lambda in my CI environment? • Will I use AWS services for unit testing? • What about mocking? Local deployment is helpflul to iterate fast • How do I replicate Lambda locally? • How can I simulate AWS services? - "Easy" for some (many dynamoDB implementations) - Much harder for some complex integration (DynamoDB streams for instance?) - Several projects working on this (localstack)
  • 25. Packaging and versioning Managing versioning • Easy for the code • Lambda can be versioned in AWS Most frameworks are designed to push from local machine • Build the code, get dependencies, push • Can be duplicated in CI • But no real artifact that can be shared Deploying the same version across environments? Is there a deployment "artifact" I can share - across environements - across AWS accounts (Prod / Staging) - with all the dependencies built-in
  • 26. What is an application? Is it a single function? • Deployed independently • Versioned independently > What about shared libraries between functions? The answer is probably somewhere in the middle • No clear best practice yet • Trial and error Is it all my functions? • Versioned as a whole • With bundled shared libraries • Same artifact with different handlers • Deployed together or independently? > Functions and dependencies can sum up to a big artifact (Megabytes)
  • 28. Conclusion Serverless is the future (or a big part of it) • Focus on business logic that matters • Much simpler applications • Really pay for what you use Serverless creates many new challenges • How can we adapt standard code best practices? • How do operate these new applications? From NoOPS to NewOPS • No longer sysadmins or netadmins • Supervision remains similar but requires new tools • A big focus on new architectures and new backends • Optimize for performance and costs