The product: a ride exchange
Model ride hailing as a two-sided, real-time marketplace whose core loop is request, quote, match, trip, payment, and feedback.
Guided learning track
A ride-exchange architecture evolved from a complete three-nines regional system through four-nines automation to selective five-nines critical flows.
Orientation · Tutorial 1 of 38
Establish the ride-exchange product boundary, reliability targets, and shared scale envelope.
Model ride hailing as a two-sided, real-time marketplace whose core loop is request, quote, match, trip, payment, and feedback.
Translate demand, latency, availability, durability, RPO, and RTO into numeric constraints that architecture decisions can be tested against.
Build the complete ride exchange in one region with simple, correct service, data, infrastructure, and operating boundaries.
Separate edge, identity, marketplace, trip, payment, communication, and data-platform responsibilities around a small set of authoritative state flows.
Separate authentication, rider and driver profiles, document verification, and account state so onboarding checks do not leak into every service.
Combine map data, routing, traffic signals, and continuous ETA correction while isolating uncertain predictions from trip truth.
Ingest high-rate, ephemeral driver updates with freshness rules and spatial indexing so nearby-driver views remain useful without pretending every point is durable truth.
Produce expiring price quotes from supply and demand, using surge to balance the market without rewriting an accepted trip's price.
Rank feasible driver–rider pairs under location, ETA, and marketplace constraints while keeping dispatch decisions explicit and auditable.
Make the trip state machine the source of truth, enforcing legal transitions and idempotent commands across request, match, pickup, and completion.
Record money movement in an immutable double-entry ledger while isolating processor retries, reconciliation, and driver payouts from trip state.
Treat push, chat, and masked calling as asynchronous, privacy-preserving channels that support a trip without becoming its source of truth.
Build read models and privileged workflows around immutable trip history so support actions are auditable and operational tools stay off the hot path.
Start with one region spread across three zones, using stateless services and zonally redundant data to survive a single-zone failure.
Instrument latency, traffic, errors, and saturation, then connect actionable alerts to an on-call response loop.
Move operational events into an analytical pipeline so reporting workloads cannot destabilize the transactional ride path.
Recognize that a three-nines baseline tolerates hours of annual disruption and still fails under zonal loss, overload, and fragile dependencies.
Harden the complete exchange with automated recovery, isolation, replay, safe change, and active-passive disaster recovery.
Give user journeys explicit SLOs and criticality tiers so scarce reliability investment follows impact and remaining error budget.
Remove hidden single points of failure by adding zonal redundancy, independent dependencies, health-aware routing, and bounded failover.
Shard state by stable ownership keys and automate fenced failover so growth and replica loss do not require unsafe manual intervention.
Publish state changes through a transactional outbox and make consumers idempotent so events can be retried and replayed safely.
Partition dispatch by geography, manage boundary spillover, and keep candidate search local enough to scale without missing viable drivers.
Combine deadlines, bounded retries, circuit breakers, load shedding, and graceful degradation so dependency trouble does not cascade.
Replicate critical state to a passive region and define detection, fencing, traffic shift, RPO, and RTO for a controlled regional failover.
Reduce deployment risk with canaries, feature flags, backward-compatible schemas, and migrations that can be paused or reversed.
Turn user-facing SLIs into SLOs and error budgets that govern alerting, reliability work, and release pace.
Stream immutable operational events into replayable processing so real-time metrics and features do not couple analytics to production databases.
Layer identity, authorization, encryption, audit trails, and risk signals around sensitive ride and payment flows without overloading the hot path.
Validate that every critical ride path has zonal redundancy, bounded failover, overload protection, observability, and safe-change controls.
Apply five-nines mechanisms only to critical flows through active-active regions, cells, quorum state, static stability, and rehearsed operations.
Apply five nines only to safety- and trip-critical paths, allowing less critical analytics and convenience features to fail more cheaply.
Assign each trip and user a regional home while serving traffic from multiple regions, avoiding cross-region write conflicts during normal operation.
Group compute and data into repeatable cells so a hot market or failed dependency affects only its assigned riders and drivers.
Use quorum-backed storage for authoritative state and disposable fast stores for location and presence, matching consistency cost to data semantics.
Precompute and cache routing and ownership decisions so existing rides continue when control-plane services are unavailable.
Make mobile clients retry safely, cache useful state, and communicate degraded service because intermittent networks are part of the system.
Use hypothesis-driven failure injection and gamedays to prove that detection, degradation, and recovery work under realistic conditions.
Combine synthetic probes, client telemetry, and guarded automation to detect failures invisible to server metrics and remediate known cases safely.
Treat additional availability as an ongoing staffing and complexity cost, supported by ownership, runbooks, incident learning, and capacity discipline.
Assemble cells, regional homes, durable event flows, layered state, observability, and safe operations into one selectively five-nines ride exchange.