{"slug": "system-design-part-4-amazon-condor-anticipatory-shipping", "title": "[System Design] Part 4 — Amazon CONDOR & Anticipatory Shipping", "summary": "Amazon processes billions of orders annually through over 175 fulfillment centers using a 3-tier optimization architecture. The system includes anticipatory shipping, which uses machine learning to predict demand and move inventory closer to customers before orders are placed, and CONDOR, which continuously re-optimizes fulfillment plans within a 5-6 hour window. Amazon holds a patent (US Patent 8,615,473) for a system that begins shipping items before a customer places an order.", "body_md": "Amazon processes **billions of orders annually** through a network of over **175 fulfillment centers** globally. To maintain their 1-2 day (or same-day) delivery guarantees, they built a 3-tier optimization architecture:\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│  TIER 1: ANTICIPATORY SHIPPING (Long-term — weeks/months)  │\n│  → ML predicts demand → Moves inventory close to customers │\n│     BEFORE they place an order                             │\n├─────────────────────────────────────────────────────────────┤\n│  TIER 2: REGIONALIZATION (Medium-term — days/weeks)        │\n│  → Partitions the fulfillment network into autonomous zones│\n│  → Ensures 70-80% of orders are fulfilled intra-region     │\n├─────────────────────────────────────────────────────────────┤\n│  TIER 3: CONDOR (Short-term — hours)                       │\n│  → Continuously re-optimizes the fulfillment plan within   │\n│     a 5-6 hour window before pick-and-pack begins.         │\n└─────────────────────────────────────────────────────────────┘\n```\n\nAmazon holds a patent (US Patent 8,615,473) describing a system that **begins shipping items BEFORE a customer places an order**. It sounds like science fiction, but it's a reality.\n\n```\nTraditional Model:\n  Customer orders → Warehouse processes → Ships → Delivered (2-5 days)\n\nAnticipatory Shipping:\n  ML predicts: \"Customers in Region X will buy 200 iPhone 16s in the next 3 days\"\n  → Amazon ships 200 iPhones from a central hub to local delivery hubs in Region X\n  → Customer places order → The item is already locally staged → Delivered same-day!\n```\n\n| Input Feature | Significance |\n|---|---|\n| Purchase history | What do they buy, and how often? |\n| Browsing behavior | What are they looking at? Cart abandonment? |\n| Wishlists | Explicitly desired items |\n| Seasonal patterns | Winter coats in November, sunscreen in June |\n| Regional demographics | High-income areas? Young families? College towns? |\n| Trending products | Items going viral on social media |\n| Weather forecast | Rain forecasted → move umbrellas to local hubs |\n| Events calendar | Black Friday, Prime Day, major sports events |\n\n```\nThe Anticipatory Flow:\n\n1. ML Model: \"Zip code 10001 (NY) has an 87% probability of ordering 200 cases of water in the next 3 days.\"\n\n2. System: Ships 200 cases from the Midwest Central Hub → NY Local Hub.\n   These packages DO NOT HAVE A SPECIFIC CUSTOMER ADDRESS YET → They are just labeled \"Destination: NY Hub\".\n\n3. Customer A in NY orders 2 cases of water:\n   → The system assigns an address to 2 of the pre-staged cases at the NY Hub.\n   → Delivered in 2 hours!\n\n4. If predictions are slightly off (e.g., 50 cases remain unsold):\n   → Amazon might run a targeted flash sale for that zip code.\n   → Or re-route them back to the central hub.\n```\n\nWhen you place an order, Amazon doesn't process it immediately. There is a **5-6 hour window** between the order being placed and the warehouse actually starting the pick-and-pack process. CONDOR exploits this window to optimize delivery routes.\n\n```\n17:00 — Order A is placed in Zone 1\n  → CONDOR Plan v1: Ship from WH Alpha, individual truck.\n\n17:15 — Order B is placed in Zone 1 (near Order A)\n  → CONDOR Plan v2: Consolidate A+B onto the same route → saves 1 truck trip.\n\n17:30 — Order C is placed in Zone 2 (along the same route)\n  → CONDOR Plan v3: Consolidate A+B+C → highly dense, efficient route.\n\n17:45 — Order D is placed in Zone 9 (opposite direction)\n  → CONDOR Plan v4: Route 1 (A+B+C) + Route 2 (D only).\n\n→ Every 15 minutes, CONDOR re-evaluates the entire network to find better plans.\n→ Deadline: When the window closes (e.g., 23:00), the warehouse executes the final optimized plan.\n```\n\nCONDOR solves a variation of the **Prize Collecting Vehicle Routing Problem (PCVRP)**, which is vastly more complex than standard VRP:\n\n```\nPCVRP:\n  Maximize: Total \"prize\" (value of orders delivered on time)\n  Minimize: Total transportation cost\n  Subject to:\n    - Capacity constraints (vehicle limits)\n    - Time windows (delivery SLAs)\n    - Fleet size limits\n    - Network density bonuses: bundling orders in the same neighborhood significantly reduces cost-per-package.\n\nSolving Techniques:\n  1. Mathematical optimization (LP/MIP relaxation)\n  2. Local search heuristics (2-opt, 3-opt swaps between routes)\n  3. Iterative re-optimization (running the solver continuously as new data arrives)\n```\n\nAmazon has stated that CONDOR reduces the number of feasible routing decisions for a given area from **millions** to **under 10 viable options**, transforming an NP-hard problem into something solvable in near real-time.\n\nPrior to 2022, if a customer in New York ordered an item, it might have shipped from a warehouse in California (3,000 miles away) if the local warehouse was out of stock. This was incredibly inefficient.\n\nAmazon restructured its US network into **8 autonomous regions**:\n\n```\nPre-Regionalization:\n  Customer in NY → Order fulfilled from CA (3,000 miles) → 3-5 day delivery.\n\nPost-Regionalization:\n  Customer in NY → Order fulfilled from NJ or PA (100 miles) → Same/Next day delivery.\n\nResults:\n  - Average travel distance per package dropped by ~60%\n  - Significant reduction in shipping costs\n  - Delivery times dropped by 1-2 days\n  - Massive reduction in carbon footprint\nSKU \"IPHONE-16-256GB\":\n  National Demand: 100,000/month\n\n  Northeast Region (NY, NJ, PA):  25,000/mo → Stock 30,000\n  West Region (CA, WA, OR):       20,000/mo → Stock 25,000\n  South Region (TX, FL, GA):      18,000/mo → Stock 22,000\n  ...\n\n  Buffer: 22,000 kept at a central cross-dock facility for overflow/rebalancing.\n```\n\n| Aspect | Amazon | eBay | Regional Marketplaces |\n|---|---|---|---|\nModel |\n1P + FBA (Owns warehouses) | Marketplace (Sellers ship) | Marketplace + Fulfillment (e.g., Shopee) |\nFacilities |\n175+ Global FCs | Seller warehouses + 3PLs | Regional fulfillment hubs |\nAllocation |\nCONDOR (Global/Continuous optimization) | Rule-based (Seller-defined) | Regional matching engines |\nAnticipatory |\nYes (Late-Select Addressing) | No | No |\nStructure |\n8 Autonomous Regions (US) | Decentralized | Geographic partitioning |\n\nYou don't need to build CONDOR to apply its principles:\n\nNext, we explore split shipments, consolidation, and the last-mile delivery problem—which accounts for 53% of all logistics costs. Read[Part 5 — Split Shipment, Consolidation & Last-Mile Delivery].\n\n*This post was originally published on my blog at Part 4 — Amazon CONDOR & Anticipatory Shipping.*\n\n**Hi, I'm Lê Tuấn Anh (vesviet) 👋**\n\n*I am a Senior Go Backend Architect & Distributed Systems Engineer with 17+ years of experience building high-traffic platforms (25M+ requests/month).*\n\n*If you enjoyed this deep-dive, let's connect on LinkedIn or explore my consulting services at tanhdev.com/hire.*", "url": "https://wpnews.pro/news/system-design-part-4-amazon-condor-anticipatory-shipping", "canonical_source": "https://dev.to/vesviet/system-design-part-4-amazon-condor-anticipatory-shipping-35nd", "published_at": "2026-06-18 00:02:11+00:00", "updated_at": "2026-06-18 00:21:13.421076+00:00", "lang": "en", "topics": ["machine-learning", "artificial-intelligence", "ai-products", "ai-infrastructure"], "entities": ["Amazon", "CONDOR", "US Patent 8,615,473", "Prize Collecting Vehicle Routing Problem"], "alternates": {"html": "https://wpnews.pro/news/system-design-part-4-amazon-condor-anticipatory-shipping", "markdown": "https://wpnews.pro/news/system-design-part-4-amazon-condor-anticipatory-shipping.md", "text": "https://wpnews.pro/news/system-design-part-4-amazon-condor-anticipatory-shipping.txt", "jsonld": "https://wpnews.pro/news/system-design-part-4-amazon-condor-anticipatory-shipping.jsonld"}}