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

Move to the Cloud, Double in Size or Automated ...

Move to the Cloud, Double in Size or Automated MySQL Scaling: Pick Three

The slides from [my talk at 2018's Datadog Dash conference](https://www.youtube.com/watch?v=6t8ae1Jgf_s) -- about moving Shopify's data to the cloud _while_ growing and not taking down time.

Aaron Brady

July 31, 2018
Tweet

More Decks by Aaron Brady

Other Decks in Technology

Transcript

  1. 600K Active Merchants 80K RPS Peak $26B GMV 2017 800

    Developers 40 Deploys/Day What is Shopify?
  2. What is Shopify? RW RO RO RO RO RO Active

    Location Passive Location
  3. What is Shopify? RW RO RO RO RO RO Active

    Location Passive Location
  4. What is Shopify? Shard 1 Shard 3 Shard 2 Shop

    Shop Shop Shop Shop Master Catalog
  5. What is Shopify? Pod 1 Pod 3 Pod 2 MySQL

    Shared Redis Cache Cron MySQL Redis Cache Cron MySQL Redis Cache Cron Web Search
  6. What is Shopify? Pod 1 Pod 3 Pod 2 MySQL

    Shared Redis Cache Cron MySQL Redis Cache Cron MySQL Redis Cache Cron Web Search
  7. Move RW RO RO RO RO RO RO RO RO

    RO RO RO Shops 1, 2, 3 and 4 Shops 1, 2, 3 and 4
  8. Move RW RO RO RO RO RO RW RO RO

    RO RO RO Shops 1 and 3 (and old 2 and 4) Shops 2 and 4 (and old 1 and 3)
  9. Affected Merchants Length of Outage Shard Split Many Short Shop

    Mover Few Long Pod Balancer Few Short Move
  10. ~1 Year to Move 50% BFCM happens every year! Both

    locations at peak performance Double
  11. Move Then Now New Shard Time ~3 Days 10 in

    a Day Downtime Large, posted in advance Not noticeable Process Huge check lists Still check lists (smaller)
  12. Double Then Now Technology Chef k8s (also Chef) MySQL Scaling

    1000's of Connections 10s of Connections Shards Dozens 100+
  13. Automate Then Now Failovers CLI driven and complex GUI driven

    and easy to understand Alerting CRITICAL: Host is down Queries per second has fallen 50% DB Monitoring Paging Fixing it for us
  14. Related Shopify talks: Kir Shatrov: Running Jobs at Scale https://speakerdeck.com/kirs/running-jobs-at-scale

    Camilo Lopez: How Shopify Sharded Rails https://www.youtube.com/watch?v=6njTQdFLz6I Emil Stolarsky: Failovers https://www.youtube.com/watch?v=g93wNLPdkFU Jordan Wheeler / Sami Ahlroos: Automatic Failovers https://tinyurl.com/percona-talk Shuhao Wu: Ghostferry https://tinyurl.com/percona-shuhao Fantasia Copyright 1940 Walt Disney Company Tanks Photo by Manny Moss - CC-BY-ND - https://flic.kr/p/aahdGu Servers Photo by Victor Grigas - CC-BY-SA Earthworm Photo by Greg Goebel - CC-BY-SA - https://flic.kr/p/cJR7Do