Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Going to Eleven

Going to Eleven

100,000 simultaneous users. 38 days. 9 systems. One launch. Ready?

In this retelling of a real-life product "land rush", you'll learn about web load testing of a site that went from zero users to all the users in one day. This talk will cover open source tools, the AWS cloud, dependency isolation, background jobs, and profiling. Hear about some hard lessons learned while negotiating with external partners, OS tuning, and avoiding being targeted as a botnet. Walk away with some idea how to get started load testing and how to deal with problems in the architectures as they come up.

stevenjackson

March 08, 2017
Tweet

More Decks by stevenjackson

Other Decks in Technology

Transcript

  1. Goals • How to start? • Why Locust? • How

    to deal with problems in the architecture? • Make an argument for starting load testing early • Tell a compelling story
  2. • .realtor starts - Feb 2014 • Load Test start

    - 15 Sep 2014 • Soft Launch - 20 Oct 2014 • Launch - 23 Oct 2014 Timeline
  3. System Architecture Send Emails DNS Mail Forwarding Payment Processor CREA

    Membership NAR Membership Registrar Hosted Website
  4. NAR Membership Send Emails DNS Mail Forwarding Payment Processor CREA

    Membership Registrar Hosted Website Prioritizing Dependencies
  5. Why Locust? • Could interact with Rails CSRF tokens •

    Could execute end-to-end user interaction with sessions and cookies • Expands to multiple slaves to increase load capacity • Allows for distributed user actions based on percentages
  6. Methodology • Start Small (1000 simultaneous users) • Gather data

    • Grow infrastructure as we hit bottlenecks
  7. • Compression = YES, please • Serve static assets directly

    • Reverse proxy (proxy_pass) the rest to unicorn
  8. worker_processes 32 worker_rlimit_nofile 65536 use epoll worker_connections 65536 upstream realtor_unicorn

    { server unix:/tmp/realtor.sock fail_timeout=0; } keepalive_requests 0 proxy_read_timeout proxy_write_timeout client_max_body_size nginx.conf sites-available/sitename Take a look at these
  9. rails_user hard nofile 65536 /etc/security/limits.conf # Increase size of file

    handles and inode cache fs.file-max = 100000 /etc/sysctl.conf ulimits
  10. What did I learn? • Don’t wait so long to

    start load testing • The conversations drive new requirements • This stuff is hard to figure out under pressure • Too late to do big changes confidently
  11. 5 1

  12. System Architecture Send Emails DNS Mail Forwarding Payment Processor CREA

    Membership NAR Membership Registrar Hosted Website
  13. 8 0

  14. 7 0

  15. 6 0

  16. “How do I convince others to start earlier?” “How to

    do this cheaper?” “When should we start?”