Server Host Web Server Hosts Web Servers Host Job Server Hosts Job Servers Host DB Standby The Internet Host DB Reader Load Balancers Host DB Writer Edge Router Edge Router Data Center Host Web Server Load Balancers Host Job Server Host Web Server Hosts Web Servers Host Job Server Hosts Job Servers Host DB Standby Host DB Reader Load Balancers Host DB Writer Edge Router Edge Router Shopify Architecture CDN
and hurt problem determination • Everyone in Shopify R&D can deploy • Everyone in Shopify R&D must deploy • Dedicated team to build the tools to enable everyone to ship their changes with confidence
chaos with CD • Every dev takes ownership of ensuring their change lands safely • Every dev needs access and permission to act • ATC role is very helpful for herding the chaos
Push changes in a branch, make the test suite pass • Code review • Add to merge queue (or manual git merge) • Deploy to production (usually automatic) • Monitor/verify your changes
to make this pipeline fast. Why is this important? • Less wasted time for developers • Faster time to a fix for merchants • Fewer changes per deploy, so it’s safer
master on a busy day Commit every 2.4 minutes assuming 8 hour work day 3 minute deploy required for smallest batch size Builds have to keep getting faster to keep batch size down
succeeded on your branch, they will likely succeed on master after merging as well. If not, the failure has to be investigated, and potentially your merge has to be reverted. Automated Tests Deploy Container Build Git Merge
in parallel on our own GKE boxes Agents pull tests from Redis queue Ruby tests + Browser tests run with Selenium/Chrome 330 N1-standard-16 VMs 7000 Peak agents 73k Tests/Build
Strive to keep environment differences to a minimum • Push smallest possible units of change to production continuously in order to validate code • Invest in tools to keep it flowing smoothly Summary