Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

Redis-backed coordination and caching slice owned by the Ordering bounded context for buyer-scoped creation locks, HTTP idempotency markers, and cached order summaries.

Cacheazure-managed-redisResidency: eastasiaRetention: transientAccess Mode: readWriteCache

Purpose & Ownership Boundary

Order Cache and Distributed Locks is the non-authoritative Redis coordination and caching slice owned exclusively by Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs in the Ordering bounded context. Redis was chosen to provide low-latency distributed locking for concurrent checkout serialization, atomic HTTP SET NX idempotency markers, and FusionCache L2 + backplane caching across service replicas.

Data Store Profile

PropertyValue
Bounded Context / OwnerOrdering — Commerce Fulfillment TeamTeamCommerce Fulfillment TeamStream-Aligned team owning customer shopping baskets, checkout coordination, order lifecycle, and financial saga orchest...Open docs
Engine / TechnologyRedis + FusionCache (Azure Managed Redis in cloud; Redis container locally)
Store TypeCache
Primary Writer(s)Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs
Primary Reader(s)Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs
Authoritative / Source of TruthEphemeral (permanent orders live in Order DatabaseContainerv1.0.0Order DatabaseAuthoritative PostgreSQL system of record owned by the Ordering bounded context for buyers, accepted orders, purchase-ti...Ownercommerce-fulfillment-teamDiagramOpen docs)
Data ClassificationInternal
Retention / TTL PolicyTransient (all keys expire by TTL or explicit release)

Logical Data Layout & Key Patterns

Key PatternStored DataTTL / EvictionInvalidation / Update Trigger
order-create:{BuyerId} (ordering lock)Distributed creation lock handle1 minute acquisition timeoutReleased explicitly in finally after committing the order unit of work.
{HTTP method}:{request path}:{x-request-id}Atomic HTTP idempotency marker (id, name, time) via SET NX1 hour (3,600 seconds)Retained on 2xx/4xx responses; deleted immediately on unhandled exceptions or 5xx errors so clients can retry.
books:{sorted book IDs}Cached Catalog gRPC book/price batch responses30 minutes default (books, catalog tags)TTL expiration or tag invalidation.
ordering:dashboard:v1Aggregated Ordering and Catalog admin dashboard metrics15 secondsTime-based TTL expiration.
ordering:summary:v1:{orderId}:v{version}Versioned order summary projection30 minutes defaultImmutable per version; expires by TTL.
ordering:summary:v1:{orderId}:terminalTerminal-state order summary view1 hour (L1 & L2)Cached only for terminal orders; expires by TTL.
ordering:history:v1:{orderId}:terminalTerminal-state order event history1 hour (L1 & L2)Cached only for terminal orders; expires by TTL.
Integration idempotency keys24-hour Kafka message deduplication markers24 hoursAutomatic TTL expiration after consumer processing.

Consistency, Isolation & Security Guardrails

  • Buyer-scoped lock boundaries: Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs reads the basket and resolves Catalog prices before acquiring order-create:{BuyerId}, keeping the critical section scoped strictly to order creation and persistence. The lock does not replace the PostgreSQL row-version concurrency token.
  • Atomic HTTP idempotency (POST / PATCH): Requests without a non-empty x-request-id header are rejected (400 Bad Request), and duplicate in-flight or completed requests return 409 Conflict.
  • Non-authoritative for purchases: Accepted orders and checkout-time prices are always committed to Order DatabaseContainerv1.0.0Order DatabaseAuthoritative PostgreSQL system of record owned by the Ordering bounded context for buyers, accepted orders, purchase-ti...Ownercommerce-fulfillment-teamDiagramOpen docs.
Warning

Shared Redis Key-Prefix & Flush Isolation: Order Cache shares the redis cluster with Basket DatabaseContainerv1.0.0Basket DatabaseAuthoritative Redis key-value store owned by the Shopping bounded context for customer-scoped pre-checkout shopping bask...Ownercommerce-fulfillment-teamDiagramOpen docs, Catalog CacheContainerv1.0.0Catalog CacheNon-authoritative FusionCache and Redis caching layer owned by the Catalog bounded context for fast book detail lookups ...Ownercatalog-experience-teamDiagramOpen docs, Rating CacheContainerv1.0.0Rating CacheNon-authoritative FusionCache and Redis caching layer owned by the Reviews bounded context for AI-generated book feedbac...Ownercatalog-experience-teamDiagramOpen docs, and Notification idempotency markers. Flushing the shared Redis instance does not delete persisted orders in orderingdb, but it drops active HTTP idempotency markers, releases in-flight creation locks, and erases active customer baskets in Basket DatabaseContainerv1.0.0Basket DatabaseAuthoritative Redis key-value store owned by the Shopping bounded context for customer-scoped pre-checkout shopping bask...Ownercommerce-fulfillment-teamDiagramOpen docs.

Operational & Resilience Notes

Architecture Visualizations

Loading graph...