Skip to main content

Service Overview

The Multi-Region Shopping Mall platform consists of 20 microservices. Each service is responsible for a specific business domain and can be deployed and scaled independently.

Service List

Core Services

ServiceLanguageFrameworkDatabasePortNamespace
API GatewayGoGinElastiCache (Valkey)8080core-services
Product CatalogPythonFastAPIDocumentDB8080core-services
SearchGoGinOpenSearch, DocumentDB8080core-services
CartGoGinElastiCache (Valkey)8080core-services
OrderJavaSpring BootAurora PostgreSQL8080core-services
PaymentJavaSpring BootAurora PostgreSQL8080core-services
InventoryGoGinAurora PostgreSQL8080core-services

User Services

ServiceLanguageFrameworkDatabasePortNamespace
User AccountJavaSpring BootAurora PostgreSQL8080user-services
User ProfilePythonFastAPIDocumentDB8080user-services
WishlistPythonFastAPIDocumentDB8080user-services
ReviewPythonFastAPIDocumentDB8080user-services

Fulfillment Services

ServiceLanguageFrameworkDatabasePortNamespace
ShippingPythonFastAPIDocumentDB8080fulfillment
WarehouseJavaSpring BootAurora PostgreSQL8080fulfillment
ReturnsJavaSpring BootAurora PostgreSQL8080fulfillment

Business Services

ServiceLanguageFrameworkDatabasePortNamespace
PricingJavaSpring BootAurora PostgreSQL8080business-services
RecommendationPythonFastAPIDocumentDB, ElastiCache8080business-services
NotificationPythonFastAPIDocumentDB8080business-services
SellerJavaSpring BootAurora PostgreSQL8080business-services

Platform Services

ServiceLanguageFrameworkDatabasePortNamespace
Event BusGoGinMSK (Kafka)8080platform
AnalyticsPythonFastAPIOpenSearch8080platform

Technology Stack Distribution

Service Dependency Diagram

Regional Deployment Configuration

RegionRoleCharacteristics
us-east-1PrimaryHandles write operations, Global Database Primary
us-west-2SecondaryHandles read operations, write requests forwarded to Primary

Multi-Region Data Replication

  • Aurora Global Database: Less than 1 second replication lag from Primary to Secondary
  • DocumentDB Global Cluster: Data synchronization through change streams
  • ElastiCache Global Datastore: Session and cache replication across regions
  • MSK: Independent clusters per region (events processed locally)

API Path Mapping

The API Gateway routes all requests to appropriate backend services:

API PathBackend Service
/api/v1/productsproduct-catalog.core-services
/api/v1/searchsearch.core-services
/api/v1/cartcart.core-services
/api/v1/ordersorder.core-services
/api/v1/paymentspayment.core-services
/api/v1/inventoryinventory.core-services
/api/v1/authuser-account.user-services
/api/v1/profilesuser-profile.user-services
/api/v1/wishlistswishlist.user-services
/api/v1/reviewsreview.user-services
/api/v1/shipmentsshipping.fulfillment
/api/v1/warehouseswarehouse.fulfillment
/api/v1/returnsreturns.fulfillment
/api/v1/pricingpricing.business-services
/api/v1/recommendationsrecommendation.business-services
/api/v1/notificationsnotification.business-services
/api/v1/sellersseller.business-services
/api/v1/eventsevent-bus.platform
/api/v1/analyticsanalytics.platform

Common Features

All services provide the following common features:

Health Check Endpoints

  • GET /healthz - Liveness probe
  • GET /readyz - Readiness probe

Observability

  • Distributed Tracing: Tempo/X-Ray integration via OpenTelemetry
  • Metrics: Prometheus format metrics exposure
  • Logging: Structured JSON logging

Region-Aware Middleware

  • Automatic forwarding to Primary for write requests in Secondary region
  • Region information propagation via X-Region header