Most Shopify apps are built for the average case. They break at the edge case. At low traffic, a synchronous webhook handler, a single database connection pool, and a naive retry loop on 429s all look fine. They do not look fine when your app is serving 10,000 stores and a flash sale fires on all of them simultaneously. This post covers the six architecture layers that determine whether a Shopify app survives genuine scale, from 10K to 1M+ requests per day. Layer 1: Cost-Aware API Rate Limit Management The Shopify GraphQL Admin API uses a leaky bucket model: 1,000 cost points per bucket, refilling at 50 points per second on standard plans. At scale, naive consumption drains the bucket and every subsequent request returns a 429 until it refills. The fix is reading the cost from the response header and throttling proactively, not reactively. async function shopifyQuery ( client , query , variables ) { const response = await client . query ({ data : { query , variables } }); const cost = response . headers .…