Active-active order consistency

DesignHard50 minDoorDash style

Your task

Design an active-active multi-region order system for a food-delivery marketplace where both the diner and the restaurant for a given order are pinned to one metro (so a given order's writes naturally belong to one region), but a small fraction of entities are cross-metro (a chain restaurant operating in two metros, a corporate account spanning regions). Both regions accept writes. The requirement: an order's lifecycle (placed to accepted to preparing to en route to delivered) must be strongly consistent and never see two regions concurrently advancing the same order, while the system stays fully available in each region if the inter-region link drops. Define the write-ownership model, how a write that lands in the 'wrong' region is handled, and what happens to the cross-metro entities during a partition.

It covers

  • Active active
  • Write routing
  • Sticky affinity