Skip to main content

Architecture Overview

Multi-Region Shopping Mall is a global-scale e-commerce platform built on AWS. It operates in an Active-Active configuration across two regions: us-east-1 (Primary) and us-west-2 (Secondary), achieving both strong consistency and low latency through the Write-Primary/Read-Local pattern.

Design Goals

GoalTargetAchievement Method
Availability99.99% uptimeMulti-region Active-Active, automatic failover
Read Latencysub-100msRead-Local pattern, ElastiCache, CloudFront CDN
Write ConsistencyStrong consistencyWrite-Primary pattern, Aurora Global DB
Scalability10x spike handlingEKS + Karpenter auto-scaling, MSK partitioning
RecoveryRPO <1s, RTO <10mGlobal data replication, automated DR procedures

Global Traffic Flow

Per-Region Deployment Architecture

Service Domain Structure

20 microservices are categorized into 5 domains.

Technology Stack by Service

DomainServiceLanguage/FrameworkPrimary Data Store
CoreAPI GatewayGo/GinElastiCache (sessions)
Product CatalogPython/FastAPIDocumentDB, OpenSearch
SearchGo/GinOpenSearch
CartGo/GinElastiCache
OrderJava/SpringAurora PostgreSQL
PaymentJava/SpringAurora PostgreSQL
InventoryGo/GinAurora PostgreSQL, ElastiCache
UserUser AccountJava/SpringAurora PostgreSQL
User ProfilePython/FastAPIDocumentDB
WishlistPython/FastAPIDocumentDB
ReviewPython/FastAPIDocumentDB, OpenSearch
FulfillmentShippingPython/FastAPIAurora PostgreSQL
WarehouseJava/SpringAurora PostgreSQL
ReturnsJava/SpringAurora PostgreSQL
BusinessPricingJava/SpringAurora PostgreSQL, ElastiCache
RecommendationPython/FastAPIDocumentDB, ElastiCache
NotificationPython/FastAPIDocumentDB, MSK
SellerJava/SpringAurora PostgreSQL, DocumentDB
PlatformEvent BusGo/GinMSK Kafka
AnalyticsPython/FastAPIOpenSearch, Aurora PostgreSQL

Core Architecture Patterns

1. Write-Primary / Read-Local

2. Event-Driven Architecture

3. CQRS (Command Query Responsibility Segregation)

Infrastructure Resource Summary

Resourceus-east-1us-west-2Role
VPC10.0.0.0/1610.1.0.0/16Network isolation
Subnets9 (3 tier x 3 AZ)9 (3 tier x 3 AZ)Tier separation
EKS NodesKarpenter managedKarpenter managedWorkload execution
AuroraPrimary WriterRead ReplicaRelational data
DocumentDBPrimarySecondaryDocument data
ElastiCachePrimaryReplicaCache/Sessions
MSK3 brokers3 brokersEvent streaming
OpenSearch3 nodes3 nodesSearch/Logging

Next Steps