It’s 4am and you don’t know it, but you're about to get three times the traffic you were expecting. Is your service ready to handle it? Systems are only as scalable as their weakest component. Large scale load testing in production is the best (and surest) way to ensure that services can truly scale to the unexpected. But the load generator itself can be difficult to scale, expensive to run on hundreds or thousands of hosts, challenging to keep the data secure, and time consuming to develop. The Amazon.com retail site is one of most heavily used sites in the world, and has to be ready for anything, at anytime. How do you design a load test for this in record time while keeping it cost effective? Well, you use AWS! Come learn Best Practices on how you can use Amazon SQS, Amazon S3, Amazon EC2, Amazon CloudWatch, Auto Scaling, and Amazon DynamoDB to design horizontally scalable large-scale load tests that can simulate the load that millions of users are putting onto your site. We met a tight schedule and did it under budget thanks to AWS and you can too!
27. Replaying traffic to generate load
Test Data
Repository
Controller
Controller
Metrics &
Dashboards
Job
Job
Job
Job
Job
Job
Job
Worker
Worker
Worker
Worker
Worker
Worker
Worker
Service
under test
28. Amazon S3 for storing data
Amazon DynamoDB for
indexing
Test Data
Repository
Controller
Controller
Reactive
auto scaling
based on
queue size
Job
Job
Job
Job
Job
Job
Job
Amazon SQS
for state,
resilience
Amazon
CloudWatch
Metrics &
Dashboards
Worker
Worker
Worker
Worker
Worker
Worker
Worker
Amazon EC2 & Auto Scaling
for hardware
30. Artificial traffic to generate load
• Why?
– You do not have
real-world data
– You expect a
change in traffic
• How?
– Control rate
– Control blend
– Control duration
31. Artificial traffic to generate load
50,000 TPS
for 20 minutes
Minute#1: 50,000 TPS, 99% 1%
99% Read, 1% Writes
Minute#20: 50,000 TPS, 99% 1%
85,000 TPS
for 45 minutes
90% Read, 10% Writes
Minute#1
…
10 TPS
for 1 minute,
99% R 1% W
10 TPS
for 1 minute,
99% R 1% W
1
2
…
95,000 TPS
for 3 hours
80% Read, 20% Writes
10 TPS
for 1 minute,
99% R 1% W
5000
33. Amazon EC2 Spot Instances
• A great way to inexpensively test
– Up to 90% off regular price (name your price)
– Interruption-tolerant, time-flexible tasks
• Approaches
– Combine with on-demand instances (burst)
– Try Spot Instances first, then fallback to on-demand