Café AWS ArchitectureEvolution
From a €68/month single VPC for a local coffee shop to a €150,000/month global platform capable of serving 10 million customers per day across 35,000+ stores.
€68
V2 Monthly Cost
€150K
Target Monthly Cost
3,000×
Cost Efficiency Gain
99.999%
Target SLA
// Business Scenario & Growth
Frank and Martha opened their first café with zero IT budget. Their daughter Sofía managed a basic PHP website and online orders. This project traces their architecture through five growth stages — each driven by real business events: a TikTok viral post, a Valentine's Day rush, a franchise expansion, and ultimately the dream of competing at Starbucks scale.
| Stage | Year | Stores | Customers/Day | Revenue/Day | SLA | Cost/Month |
|---|---|---|---|---|---|---|
| Local Café | 1 | 1 | 80-150 | €500-1,200 | 95% | €68 |
| Growing | 2 | 1 | 300-500 | €2,100-4,500 | 99% | €140 |
| Regional Brand | 3 | 3-5 | 1,500-3,000 | €12,000-27,000 | 99.9% | €400 |
| National Chain | 4 | 20-50 | 10,000-25,000 | €80,000-225,000 | 99.95% | €750 |
| Starbucks Scale | 5+ | 35,000+ | 10,000,000 | ~$108.7M | 99.999% | €150,000 |
// Architecture Evolution

First AWS architecture: VPC with Public, Private App, and Private DB subnets. EC2 t3.micro, RDS MariaDB Single-AZ, ALB, NAT Gateway, and Secrets Manager. ~€68/month.

High availability across two AZs with ALB Cross-AZ, ASG (min=2, max=8), RDS Multi-AZ, dual NAT Gateways, Route 53 failover, and CloudFormation. ~€140/month.

Asynchronous order processing: CloudFront + WAF → ALB → Web Tier → SNS → SQS queues → Worker ASG → RDS. ElastiCache Redis for 80% cache hit ratio. ~€400/month.

Hybrid model: EU monolith (EC2 PHP + RDS) coexists with US serverless stack (API Gateway + Lambda + DynamoDB Global Tables). ~€750/month.

Five specialized microservices on ECS Fargate across 3 regions: Edge → API+Auth → Compute → Data → Observability. Aurora PostgreSQL Global, App Mesh, Shield Advanced. ~€3,000/month.

Global platform: 15+ regions, 15+ microservices, S3 Data Lake, Transit Gateway + Direct Connect, AWS Organizations + Control Tower, GuardDuty + Macie. ~€150,000/month.
// Five-Year Evolution Summary
| Version | Stores | Customers/Day | SLA | Architecture | Cost/Month | Cost/Transaction |
|---|---|---|---|---|---|---|
| V1-V2 | 1 | 150 | 95% | Monolith | €68 | €0.15 |
| V3-V4 | 1 | 500 | 99% | Multi-AZ HA | €140 | €0.09 |
| V5 | 5 | 3000 | 99.5% | Decoupled | €400 | €0.04 |
| V6 | 50 | 100K | 99.9% | Serverless + Multi-Region | €750 | €0.002 |
| V7 | 50 | 500K | 99.95% | Microservices | €3,000 | €0.001 |
| Target | 35K | 10M | 99.999% | Global Platform | €150K | €0.00005 |
Cost per transaction dropped 3,000× — from €0.15 in V2 to €0.00005 at Target.
// Key Architectural Decisions
// Cost Analysis & ROI
The total infrastructure cost grows from €68/month to €150,000/month, but the cost per transaction drops 3,000×. In V2, every coffee order cost Frank 15 cents in infrastructure. At Target, it costs 0.005 cents.
€68
V2 Monthly Cost
66% less than on-premise server
€750
V6 Monthly Cost
0.01% of €225K daily revenue
3,000×
Cost Efficiency Gain
€0.15 → €0.00005 per transaction
V6 Serverless Stack Breakdown (~$820 / €750)
API Gateway HTTP API
UberEats + Deliveroo + Franchise + Mobile APIs
$135/month
Lambda (Loyalty + Catalog + Reporting)
Pay-per-use compute
$85/month
DynamoDB On-Demand (2 tables)
Auto-scaling NoSQL
$200/month
Cognito (400K users)
Identity and access management
$165/month
EC2 + ALB + NAT (Core)
PHP monolith core
$142/month
RDS Multi-AZ + Read Replica
Relational data persistence
$195/month
Third-party API infrastructure generates ~€80,000 in monthly orders at a cost of $135 — an ROI of 59,000%.