4. A typical Rails stack
Nginx+Passenger • Passenger forwards
HTTP requests
• Rails processes generate
responses
• Database is shared by all
Rails processes
5. Rails concurrency
• Multiple Rails worker processes per server
• # of processes is limited by available
memory
• Each Rails process handles one request at a
time
6. Key Concept!
• There’s a finite number of requests that can
be handled concurrently
• Additional requests wait until the next Rails
process becomes available
23. Test in a realistic
environment
• Use realistic data
• Use an environment that replicates
production
24. Consider your location
• Latency can affect load test results
• Consider running your load test from the
region where most of your users originate
25. Consider the effects of
caching
• To test worst-case performance, you may
need to bust some caches
• Vary the URL or query parameters
GET /blog/article_1
GET /blog/article_2
GET /blog/article_3
...
26. Pay attention to
request headers
• Emulate the HTTP headers of your
expected clients
• Accept-Encoding: gzip, deflate
• Accept: */*
• User-Agent:
27. Try
• Sign up & test with 250 virtual users for
free
• Engine Yard Cloud users
• http://cloud.engineyard.com/addons/blitz
• Or signup directly
• http://blitz.io