Building and maintaining complex distributed systems
June 19–20, 2017: Training
June 20–22, 2017: Tutorials & Conference
San Jose, CA

Standing on the shoulders of giants: Unleashing the power of scriptable load balancers

Emil Stolarsky (Shopify), Justin Li (Shopify)
11:25am–12:05pm Wednesday, June 21, 2017
Level: Intermediate
Average rating: ****.
(4.00, 2 ratings)

Who is this presentation for?

  • SREs, backend developers, and those responsible for keeping a web app running during high load

Prerequisite knowledge

  • Experience operating load balancers and hosting a medium- to large-scale web application

What you'll learn

  • Understand how scriptable load balancers allow engineers to solve difficult infrastructure problems with noninvasive, elegant solutions
  • Explore the open source framework Shopify uses to implement and configure middleware, the test harness that gives it confidence in its code correctness, and how it's able to deploy code in 10 seconds
  • Learn how to leverage the power of NGINX and Lua

Description

Every year, organizations continue adding more services. It’s unsustainable to have a dedicated team of SREs for each one, so the industry is moving to a product team SRE model. We’re now accustomed to building custom services that applications reach out to but not middleware services that operate on requests before they reach their destination.

Load balancers have the potential to provide application-aware middleware without making changes to the application itself. However, traditional load balancers can’t be easily and deeply customized or redeployed quickly without significant risk. Instead, a scripting language must be embedded to fulfill these requirements.

Emil Stolarsky and Justin Li explain how Shopify uses scriptable load balancers (with NGINX and LuaJIT via OpenResty) to solve difficult infrastructure problems. Its NGINX scripts deploy in 10 seconds, run through a thorough suite of automated tests, and have allowed Shopify to solve sharding across data centers, handle some of the world’s biggest flash sales, and respond quickly to layer 7 DDoS attacks. What once took a large team of engineers can now be accomplished by one of any size.

Photo of Emil Stolarsky

Emil Stolarsky

Shopify

Emil Stolarsky is a production engineer at Shopify, where he works on performance, scriptable load balancers, and DNS tooling. When he’s not trying to make Shopify’s global performance heat map green, he’s shivering over a spiked cup of coffee in the great Canadian north.

Photo of Justin Li

Justin Li

Shopify

Justin Li is a production engineer at Shopify, where he works on performance, parsers, and distributed systems. To unwind after making the computers go fast, he attempts to make the office karts go fast instead.