Luke Hedger
The LEGO Group
Serverless Architecture Conf - Oct 2022
20+ Microservices
80+ Lambda functions
100+ GB in DynamoDB
10+ Step Functions workflows
40+ EventBridge rules
Image from cockroachlabs.com
async
processes
365+ days
shoppers
Image from leanovia.com
What happens after the serverless launch, after the pioneering?
How does mature serverless app stay modern?
DELIVERY SPEED
APP STABILITY
Serverless Things | Start → Scale |
---|---|
Delivery pipelines | Start with one, scale to many. Move focus from implementation to delivery |
Separate concerns | Start with few, scale to many. Collect domain knowledge, avoid wrong abstraction |
3rd party tools | Didn't exist (EventBridge) or unproven (CDK). Evolvable architecture |
Emerging standards | Serverless matures, community grows, discussion amplifies |
Test strategy | Stability > speed → stability == speed |
Observability | Unknowns decrease over time |
DELIVERY SPEED
APP STABILITY
Serverless stability is often compromised by complex events
Baskets
Orders
Payments
Shopper checkout
Order submission
Payment requests
Asynchronous authorisations
Order fulfilment
Baskets
Orders
Payments
Is payment authorised?
Order submitted
Payment authorised
1
2
3
Baskets
Orders
Payments
Order submitted
Payment authorised
1
1
1
2
Payment.Authorised.Ecom
Payment.Authorised.Pos
Order.Created.Uk
Basket.Paid.Eu
We need to observe production behaviour ASAP when using managed services
Design → Develop → Test → Release → Observe
∞
Speed up tests by reducing coverage
Designing a test strategy allows us to ship at a sustainable rate as our codebase grows
❌ Test everything all the time
❌ Long-running tests
❌ Too-good tests
❌ Ignore failures/hit retry and 🤞
Identify critical paths ✅
Test against the cloud ✅
Test integration points/event sources ✅
Blend with observability ✅