Storefront Rendering Performance
How Shopify Dynamically Routes Storefront Traffic - Shopify

How Shopify Dynamically Routes Storefront Traffic - Shopify

4/9/2021

What this post added

This post details the evolution of Shopify's storefront traffic routing strategy, specifically focusing on the dynamic routing mechanism implemented using nginx with OpenResty. It describes the transition from static routing rules in Lua files to a dynamic JSON-based rule system managed via a control plane and the 'Spy' chatbot. Key technical contributions include the configuration options for rules (rule_name, filters, shop_ids), traffic distribution rates (render_rate, verify_rate, reverse_verify_rate, self_verify_rate), and the implementation details within nginx's Lua module for rule evaluation and asynchronous verification requests. It also highlights how this dynamic routing system was leveraged for resilience testing and gradual rollouts.

Read the original post ↗