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

Scaling a web stack

Scaling a web stack

A talk on scaling a typical web stack, based on lessons learned at 99designs, given to an RMIT Systems Architecture class.

Lars Yencken

April 29, 2013
Tweet

More Decks by Lars Yencken

Other Decks in Programming

Transcript

  1. App

  2. Cache App App Cache App App App App Memcache Queue

    Worker remove single points of failure DB DB*
  3. Cache App App Cache App App App App Memcache Queue

    Worker Balancer DB add flexibility to the cache layer DB*
  4. • "Cloud" hosting on Amazon Web Services • Instead of

    few, highly-tuned servers, have many disposable servers • Tradeoff that favours flexibility
  5. Costs of instability • Lost customer business (direct & indirect)

    • Support burden and costs • Ops burden and costs
  6. Asynchronous tasks DB App App App App App App DB

    Queue Worker 3rd party services
  7. • Less traffic (experiments by Yahoo, Microsoft, Google; ranking) •

    Worse user experience • Higher hardware costs Costs of slow sites
  8. Cacheing DB Cache App App Cache App App App App

    DB Memcache whole pages & images whole files on disk db queries & page fragments
  9. Difficulties • Norms for browsers and internet connections constantly change

    • Some strategies conflict with each-other • Measure, measure, measure!