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.
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.
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.
©2017, O'Reilly Media, Inc. • (800) 889-8969 or (707) 827-7019 • Monday-Friday 7:30am-5pm PT • All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. • firstname.lastname@example.org