惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 聂微东
宝玉的分享
宝玉的分享
Apple Machine Learning Research
Apple Machine Learning Research
罗磊的独立博客
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
博客园 - 【当耐特】
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
博客园 - 司徒正美
博客园 - Franky
爱范儿
爱范儿
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
量子位
博客园 - 叶小钗
博客园_首页
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
[System Design] Part 4 — Amazon CONDOR & Anticipatory Shi...
Tuấn Anh · 2026-06-18 · via DEV Community
Cover image for [System Design] Part 4 — Amazon CONDOR & Anticipatory Shipping

Tuấn Anh

Amazon Fulfillment: The Three Tiers of Optimization

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:

┌─────────────────────────────────────────────────────────────┐
│  TIER 1: ANTICIPATORY SHIPPING (Long-term — weeks/months)  │
│  → ML predicts demand → Moves inventory close to customers │
│     BEFORE they place an order                             │
├─────────────────────────────────────────────────────────────┤
│  TIER 2: REGIONALIZATION (Medium-term — days/weeks)        │
│  → Partitions the fulfillment network into autonomous zones│
│  → Ensures 70-80% of orders are fulfilled intra-region     │
├─────────────────────────────────────────────────────────────┤
│  TIER 3: CONDOR (Short-term — hours)                       │
│  → Continuously re-optimizes the fulfillment plan within   │
│     a 5-6 hour window before pick-and-pack begins.         │
└─────────────────────────────────────────────────────────────┘


Anticipatory Shipping — Shipping Before You Buy

A Crazy but Effective Idea

Amazon 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.

Traditional Model:
  Customer orders → Warehouse processes → Ships → Delivered (2-5 days)

Anticipatory Shipping:
  ML predicts: "Customers in Region X will buy 200 iPhone 16s in the next 3 days"
  → Amazon ships 200 iPhones from a central hub to local delivery hubs in Region X
  → Customer places order → The item is already locally staged → Delivered same-day!

ML Model Input Features

Input Feature Significance
Purchase history What do they buy, and how often?
Browsing behavior What are they looking at? Cart abandonment?
Wishlists Explicitly desired items
Seasonal patterns Winter coats in November, sunscreen in June
Regional demographics High-income areas? Young families? College towns?
Trending products Items going viral on social media
Weather forecast Rain forecasted → move umbrellas to local hubs
Events calendar Black Friday, Prime Day, major sports events

Late-Select Addressing — The Key Technique

The Anticipatory Flow:

1. ML Model: "Zip code 10001 (NY) has an 87% probability of ordering 200 cases of water in the next 3 days."

2. System: Ships 200 cases from the Midwest Central Hub → NY Local Hub.
   These packages DO NOT HAVE A SPECIFIC CUSTOMER ADDRESS YET → They are just labeled "Destination: NY Hub".

3. Customer A in NY orders 2 cases of water:
   → The system assigns an address to 2 of the pre-staged cases at the NY Hub.
   → Delivered in 2 hours!

4. If predictions are slightly off (e.g., 50 cases remain unsold):
   → Amazon might run a targeted flash sale for that zip code.
   → Or re-route them back to the central hub.


CONDOR — Customer Order and Network Density OptimizeR

The Problem CONDOR Solves

When 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.

17:00 — Order A is placed in Zone 1
  → CONDOR Plan v1: Ship from WH Alpha, individual truck.

17:15 — Order B is placed in Zone 1 (near Order A)
  → CONDOR Plan v2: Consolidate A+B onto the same route → saves 1 truck trip.

17:30 — Order C is placed in Zone 2 (along the same route)
  → CONDOR Plan v3: Consolidate A+B+C → highly dense, efficient route.

17:45 — Order D is placed in Zone 9 (opposite direction)
  → CONDOR Plan v4: Route 1 (A+B+C) + Route 2 (D only).

→ Every 15 minutes, CONDOR re-evaluates the entire network to find better plans.
→ Deadline: When the window closes (e.g., 23:00), the warehouse executes the final optimized plan.

The CONDOR Algorithm

CONDOR solves a variation of the Prize Collecting Vehicle Routing Problem (PCVRP), which is vastly more complex than standard VRP:

PCVRP:
  Maximize: Total "prize" (value of orders delivered on time)
  Minimize: Total transportation cost
  Subject to:
    - Capacity constraints (vehicle limits)
    - Time windows (delivery SLAs)
    - Fleet size limits
    - Network density bonuses: bundling orders in the same neighborhood significantly reduces cost-per-package.

Solving Techniques:
  1. Mathematical optimization (LP/MIP relaxation)
  2. Local search heuristics (2-opt, 3-opt swaps between routes)
  3. Iterative re-optimization (running the solver continuously as new data arrives)

The Major Breakthrough

Amazon 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.


Regionalization — Partitioning the Network

Prior 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.

Amazon restructured its US network into 8 autonomous regions:

Pre-Regionalization:
  Customer in NY → Order fulfilled from CA (3,000 miles) → 3-5 day delivery.

Post-Regionalization:
  Customer in NY → Order fulfilled from NJ or PA (100 miles) → Same/Next day delivery.

Results:
  - Average travel distance per package dropped by ~60%
  - Significant reduction in shipping costs
  - Delivery times dropped by 1-2 days
  - Massive reduction in carbon footprint

Regional Inventory Strategy

SKU "IPHONE-16-256GB":
  National Demand: 100,000/month

  Northeast Region (NY, NJ, PA):  25,000/mo → Stock 30,000
  West Region (CA, WA, OR):       20,000/mo → Stock 25,000
  South Region (TX, FL, GA):      18,000/mo → Stock 22,000
  ...

  Buffer: 22,000 kept at a central cross-dock facility for overflow/rebalancing.


Comparing Amazon vs. eBay vs. Regional Marketplaces

Aspect Amazon eBay Regional Marketplaces
Model 1P + FBA (Owns warehouses) Marketplace (Sellers ship) Marketplace + Fulfillment (e.g., Shopee)
Facilities 175+ Global FCs Seller warehouses + 3PLs Regional fulfillment hubs
Allocation CONDOR (Global/Continuous optimization) Rule-based (Seller-defined) Regional matching engines
Anticipatory Yes (Late-Select Addressing) No No
Structure 8 Autonomous Regions (US) Decentralized Geographic partitioning

Lessons Learned for System Design

You don't need to build CONDOR to apply its principles:

  1. Batch processing over real-time: Don't dispatch an order the second it arrives. Hold it in a 15-30 minute batch window and optimize the entire batch together. It is always mathematically superior.
  2. Re-optimization: The best route at 17:00 may be terrible by 17:30 as new orders arrive. Run iterative optimizations.
  3. Predictive placement: If data shows consistent regional demand, stage the inventory there beforehand.
  4. Partitioning: Break massive NP-hard routing problems into smaller regional chunks to make them solvable.

Next, 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.


References & Further Reading


This post was originally published on my blog at Part 4 — Amazon CONDOR & Anticipatory Shipping.

Hi, I'm Lê Tuấn Anh (vesviet) 👋
I am a Senior Go Backend Architect & Distributed Systems Engineer with 17+ years of experience building high-traffic platforms (25M+ requests/month).
If you enjoyed this deep-dive, let's connect on LinkedIn or explore my consulting services at tanhdev.com/hire.