Loading…
Cloud, Load, and Modular Code: What 2022 Looks Like for Shopify
2023-10-18
- Source
- Shopify
- Published
- Added to Yomu
Summary
Shopify’s 2021 BFCM four-day event exposed the scale its commerce platform must absorb: peak app-server traffic exceeded 32 million requests per minute, load balancers surpassed 34 million RPM, and a flash sale used more than 20% of total computing capacity. The post frames larger, spikier sales, mobile and social commerce, and expanding buying environments as enduring engineering challenges for supporting millions of merchants. Planned work includes evolving the large Rails codebase into modular components, moving storefront rendering out of the monolith, expanding Spin cloud development environments, and making in-house load testing part of product development. The storefront split and refactoring produced four-times-faster cache fill rates and five-times-faster page rendering, while YJIT ran 31% faster than interpreted CRuby and 26% faster than MJIT; Shopify also remains committed to Rails and React Native.
Context
Shopify expects flash sales, large traffic surges, and increasingly diverse commerce environments to grow, creating engineering challenges around scalable products and infrastructure for millions of merchants. BFCM 2021 reached more than 32 million app-server requests per minute and more than 34 million load-balancer requests per minute, while one flash sale consumed over 20% of total computing capacity.
Approach / What changed
Shopify plans to build more modular code within and around its Rails monolith, including separating storefront rendering; move most developers to the Spin cloud development environment; improve developer workflows; integrate automated, in-house load testing into product development; and continue investing in Rails, React Native, infrastructure, and YJIT.
Takeaways
- Separating storefront rendering from the modular monolith and refactoring the code produced four-times-faster cache fill rates and five-times-faster page render times.
- Spin lets developers create full cloud development environments in seconds and run multiple environments for experimentation and collaboration.
- Shopify’s highest pre-BFCM load test reached 50.7 million load-balancer requests per minute, supporting efforts to test larger and spikier platform-wide surges.