bene@theodo.co.uk
Ben Ellerby
@EllerbyBen
Ben Ellerby
@EllerbyBen
http://serverless-transformation.com/
https://www.theodo.co.uk/experts/serverless
Alex White
@agwhi_
@EllerbyBen
@EllerbyBen
💰 Cost reduction
👷♂️ #NoOps... well LessOps
💻 Developers focus on delivering business value
📈 More scalable
🌳 Greener
@EllerbyBen
Lambda
S3
Dynamo
API Gateway
Compute
Storage
Data
API Proxy
Cognito
Auth
SQS
Queue
Step Functions
Workflows
EventBridge
Bus
@EllerbyBen
@EllerbyBen
@agwhi_
@agwhi_
https://levelup.gitconnected.com/aws-lambda-cold-start-language-comparisons-2019-edition-%EF%B8%8F-1946d32a0244
@agwhi_
@agwhi_
@agwhi_
Frequency
Duration
@agwhi_
@agwhi_
@agwhi_
@agwhi_
@agwhi_
@agwhi_
@agwhi_
@agwhi_
Memory = Power
@agwhi_
https://github.com/alexcasalboni/aws-lambda-power-tuning
@agwhi_
@agwhi_
Input
Output
@agwhi_
@agwhi_
@agwhi_
@agwhi_
@agwhi_
Sync
Async
@agwhi_
@agwhi_
@agwhi_
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%."
- Donald Knuth
@agwhi_
Cold Starts
Power tuning
Architecture/Code
@agwhi_
@EllerbyBen
@EllerbyBen
@EllerbyBen
@EllerbyBen
Simulating different concurrent traffic levels on an application to validate its scalability.
@EllerbyBen
@EllerbyBen
@EllerbyBen
@EllerbyBen
The Gamercraft platform needed the ability to support a massive volume of users and accommodate traffic spikes during large-scale tournaments and low usage periods
@EllerbyBen
@EllerbyBen
@EllerbyBen
@EllerbyBen
@EllerbyBen
@EllerbyBen
* Non-serverless components and 3rd parties add complexity
@EllerbyBen
@EllerbyBen
@EllerbyBen
@EllerbyBen
@EllerbyBen
@EllerbyBen
@EllerbyBen
Artillery is a load testing and smoke testing solution for SREs, developers and QA engineers
@EllerbyBen
config:
target: "https://shopping.service.staging"
phases:
- duration: 60
arrivalRate: 5
name: Warm up
- duration: 120
arrivalRate: 5
rampTo: 50
name: Ramp up load
- duration: 600
arrivalRate: 50
name: Sustained load
payload:
# Load search keywords from an external CSV file and make them available
# to virtual user scenarios as variable "keywords":
path: "keywords.csv"
fields:
- "keywords"
scenarios:
# We define one scenario:
- name: "Search and buy"
flow:
- post:
url: "/search"
body: "kw={{ keywords }}"
# The endpoint responds with JSON, which we parse and extract a field from
# to use in the next request:
capture:
json: "$.results[0].id"
as: "id"
# Get the details of the product:
- get:
url: "/product/{{ id }}/details"
# Pause for 3 seconds:
- think: 3
# Add product to cart:
- post:
url: "/cart"
json:
productId: "{{ id }}"
artillery run search-and-add-to-cart.yml
@EllerbyBen
@EllerbyBen
@EllerbyBen
Combine serverless with artillery and you get serverless-artillery for instant, cheap, and easy performance testing at scale.
@EllerbyBen
@EllerbyBen
@EllerbyBen
@EllerbyBen
@EllerbyBen
https://slides.com/alexwhite
@EllerbyBen
serverless-transformation
Serverless Optimisation Workshop
@agwhi_