Building resilient serverless workloads: Navigating through failures JIMMY DAHLQVIST | 2024-05-07
Thank You!
JIMMY DAHLQVIST Serverless enthusiast Head of AWS @ Sigma Technology Cloud Founder of serverless- handbook.com Blogging on jimmydqv.com AWS Ambassador | AWS Community Builder | User Group Leader § Hello, I'm
Agenda What is serverless and resiliency Architecting resilient system – Good practices Summary
What is serverless? Automatic and flexible scaling No capacity planning High Availability Pay-for-use billing
Service categories
What is resiliency? The ability for a software solution to handle the impact of problems, and recover from turbulent conditions, when other parts in the system fails.
“Everything fails all the time Dr. Werner Vogels , CTO, Amazon.com
Understand AWS Services Everything has a limit Understand how services work under the hood
Resiliency testing Chaos Engineering Amazon Fault Injector Service Start in QA Don’t forget about data
Web application
Do we need an immediate response?
Storage-First
Storage-First Data-centric design Durability and availability Scalable System Design Asynchronous processing
Storage-First Things to consider Architectural complexity Eventual consistency Design for idempotency Risk of over-optimization
Retries Selfish Exponential backoff Users can make it worse
DLQ
DLQ
Retries with backoff and jitter No Jitter With Jitter Image: Amazon Architecture blog (https:// tinyurl.com /y48t2v4h)
Circuit breaker
Circuit breaker Half Open
Circuit breaker Avoid cascading failures Protect system resources Risk of early circuit break Good observability required
Put it all together
Notification Service Payment Service
What we talked about Design for failure Buffer and store messages first Process asynchronously Level the load Retry on failures Break if integrations are not healthy
@jimmydahlqvist dahlqvistjimmy https://serverless- handbook.com https:// jimmydqv.com THANK YOU