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

How We Scale At Shopify

Matt Helm
January 18, 2014

How We Scale At Shopify

Shopify started as a single online snowboard shop, and has grown to power 80,000 stores and billions in sales with a single cluster of servers. Customer's flash sales and features like our Turing-complete templating language made this growth challenging. This is the story of how we raced to cache, shard and measure ALL the things in order to be ready for Cyber Monday.

Matt Helm

January 18, 2014
Tweet

More Decks by Matt Helm

Other Decks in Programming

Transcript

  1. • Fetching Resources from Cache • Charging Credit Cards via

    API • Writing Orders to Database External Calls
  2. Liquid <ul id="products"> {% for product in products %} <li>

    <h2>{{ product.name }}</h2> Only {{ product.price | price }} ! {{ product.description | prettyprint | paragraph }} </li> {% endfor %} </ul>
  3. 6 Requests 1,600 Workers = 9.6K Orders Response Time -

    Before 60 Seconds 0.1 Requests/Second = 6 Requests x x
  4. 600 Requests 1,600 Workers = 960K Orders Response Time -

    After 60 Seconds 10 Requests/Second = 600 Requests x x
  5. 50 Requests 1,600 Workers = 80K Orders Response Time -

    After 5 Seconds 10 Requests/Second = 50 Requests x x