Charles Ng
Charles Ng
Senior Production Engineer
Charles is a Senior Production Engineer at Shopify in the Traffic team where they ensure the network traffic flows efficiently through the infrastructure. His duties include network automation, scaling infrastructure and DDoS mitigation. Prior to Shopify, he developed Business Analytics software at Cognos and later at IBM. Charles holds a Bachelor of Mathematics from University of Waterloo in Canada.
Scaling Shopify's multi-tenant architecture across multiple datacenters

Multi-tenant architectures are a very convenient and economical way to share resources like web servers, job workers, and datastores among several customers on your platform. Even the smallest Shopify store on a $9/month plan can easily survive getting hammered with a 1M RPM flash sale by leveraging the resources of the entire platform. However, architectures like this can also have several drawbacks. They are potentially harder to scale and things like resource starvation or back-end outages are harder to isolate. In this talk, I'm going to walk you through the history of how Shopify grew from being a small standard single-database single-datacenter Rails application to the multi-database multi-datacenter setup that we run today. We will talk about the advantages in terms of resiliency, scalability, and disaster recovery that this architecture gives us, how we got there, and where we want to go in the future. You will learn about things like how to use the Border Gateway Protocol and Equal-Cost Multi-Path routing for implementing intra-datacenter high availability, how we implement our own load balancing algorithms, what it takes to prepare a Ruby on Rails application for a move like this, and how we do completely scripted datacenter failovers in a matter of seconds with no considerable downtime.