Behind the Scenes - A Glimpse into Tax Calculations
Etsy calculates marketplace tax by calling Vertex's tax engine: a Quotation Request SOAP call when items are added to cart, and DistributeTaxRequest calls at order creation, cancellation and refund so Vertex's tax journal holds a complete record for reporting and remittance. Product taxonomy had to be mapped to Vertex rule drivers. To protect checkout latency as traffic grew, quotation and distribution calls were split onto separate Vertex instances, which kept report generation from interfering with carts and allowed horizontal scaling via modulo routing on cart_id and receipt_id. Before major launches, shadow requests are ramped up to load-test Vertex without applying the results to buyers' carts.
Related posts
- How Shopify Dynamically Routes Storefront Traffic
Shopify Engineering mediumAdeptShopify shifted storefront traffic from its legacy Rails storefront to a rewritten renderer using a rule-based routing system in nginx/OpenResty Lua load balancers, with rules stored as JSON in a control plane and managed via the spy chatbot so changes skip CI and deploys. Each rule specifies filters, target shop IDs, and sampling rates for rendering, forward verification (legacy renders, new storefront checked), reverse verification, and self-verification against the local region's deployment. Rules are checked in the nginx rewrite phase, verification is decided in the header filter phase, and duplicate requests are sent asynchronously via nginx timers in the log phase so clients never wait on both upstreams. The same mechanism let the team mirror traffic to a separate deployment disconnected from Redis to test resilience before BFCM.
- Scaling Personalized Marketing for Multi-Tenant Commerce Platforms
Instacart Tech mediumAdeptInstacart extended its Marketplace marketing automation to 350+ Storefront Pro white-label retailers by giving each retailer its own isolated workspace in a third-party provider, fronted by Instacart-built React tooling. Per-customer events from the Campaigns Engine are rebatched by a stream consumer into groups of up to 50 to match provider API limits. A Rails/Sidekiq CRM Service then handles idempotency checks, workspace routing, personalization and vendor abstraction. Operational pieces include a shared sending domain, automated IP warming over 4–6 weeks, Liquid templates deployed per retailer via CI/CD, and workspace-level failure isolation, yielding 99.9% delivery success and zero cross-tenant leakage.
- Beyond rate limits: scaling access to Codex and Sora
OpenAI mediumAdept
OpenAI replaced hard rate-limit stops for Codex and Sora with a real-time access engine that treats rate limits, free tiers, credits, promotions and enterprise entitlements as layers in a single decision waterfall evaluated per request. Rate limits are consumed synchronously, and credits are checked in the same request but debited asynchronously through a streaming processor. Three chained datasets (product usage events, monetization events, balance updates) make every outcome auditable and replayable. Idempotency keys prevent double-debits, per-account serialized atomic transactions pair each balance decrement with an attributed record, and brief overshoots from the async delay are automatically refunded, trading strict enforcement for provable correctness.
- How Etsy gets its mobile apps ready for peak traffic
Sentry mediumAdeptBecause mobile apps can't be reverted once a binary ships, Etsy treats holiday peak prep as an October decision about visibility, routing and mitigation rather than capacity. Practices include a three-phase "code slush" that culminates in senior sign-off, dual-reporting crashes to the old and new vendors (Sentry) through peak, auditing remote experiment and operational flags so crash-prone code paths can be disabled without a release, and alerting only on crash-free rate and abnormal crashes per hour. Custom tags such as last screen reconcile code-based issue grouping with screen-based team ownership, and crash triage moved from a manual rotation to an MCP-driven agent whose assignment accuracy started near 30%. The team also translates crashes into estimated lost orders so the business can weigh them.
- How we prepare Shopify for BFCM
Shopify Engineering mediumAdeptShopify readies for Black Friday Cyber Monday with a year-long program that runs from March to October. It combines capacity planning on Google Cloud, What Could Go Wrong risk assessments, chaos-engineering Game Days on critical journeys like checkout, and a centralized Resiliency Matrix of failure modes, RTOs and runbooks. Five scale tests at forecast and p99 load (up to 200M requests per minute) used the Genghis load generator from three GCP regions, Toxiproxy fault injection and regional failovers. The tests surfaced issues such as checkout queue backups, rate-limit paths in authenticated checkout and slow region rebalancing. The newly rebuilt analytics platform needed more Kafka partitions, API memory optimization, connection-timeout tuning and load-balancer changes before facing its first holiday peak.