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

Moving Shopify Core to the Cloud

Moving Shopify Core to the Cloud

Presented at SREcon Asia 2018 by Scott Francis.

This talk covers Shopify's move from a DC-based infrastructure to a Kubernetes cloud-based architecture.

Avatar for Scott Francis

Scott Francis

June 07, 2018
Tweet

More Decks by Scott Francis

Other Decks in Technology

Transcript

  1. 80k 600k+ requests per second peak active merchants $26b 40+

    gmv (2017) daily deploys 800+ developers
  2. + =

  3. “We’re going to move to the cloud one shop at

    a time.” - Nameless Shopify Production Engineer
  4. Shop Mover • Data migration uses Ghostferry • Moving a

    shop is NOT trivial • Randomized shop selection
  5. Shop Mover New Shop Move Begin binlog Copy SELECT and

    INSERT Wait for binlog Stop Shop Writes Complete Replication Switch Shard ID Allow Shop Writes Shop Move Complete Perform Sanity Checks Wait for Jobs
  6. Activefailover Start Pod Failover Update Pod Location Pause Requests Failover

    MySQL Clean Up Transfer Jobs Pod Failover Complete Perform Sanity Checks Resume Requests
  7. k8s Scaling Problems • Running out of routes?? • How

    to communicate across clusters?? • Cross-cluster service discovery??
  8. k8s Scaling Solutions • Running out of routes?? • Cross-cluster

    service discovery?? • IP Aliasing • External kube-dns ILB
  9. kubernetes-deploy • Pre-deploys dependent resources • Watches changes to make

    sure they’re successful • Runs tasks at the beginning of the deploy
  10. Links - Ghostferry: https://github.com/Shopify/ghostferry - kubernetes-deploy: https://github.com/Shopify/kubernetes-deploy - Shipit: https://github.com/Shopify/shipit-engine

    - Chat Ops at Shopify: https://engineering.shopify.com/blogs/engineering/ implementing-chatops-into-our-incident-management-procedure