Tower defense game that teaches cloud architecture. Build infrastructure, survive traffic, learn scaling.
See the code
Server Survival is an interactive 3D simulation game where you play as a Cloud Architect. Your mission is to build and scale a resilient cloud infrastructure to handle increasing traffic loads while fighting off DDoS attacks, managing your budget, and keeping your services healthy.
Learn cloud by playing:
🏭 New: Datacenter Survival — the sister game. This one teaches the logical layer of the cloud; that one teaches the physical layer it runs on: power chains, heat, cooling, PUE. Play it here.
Every mechanic is a real cloud concept in miniature:
Survive as long as possible! Manage your Budget ($), Reputation (%), and Service Health.
| Traffic | Color | Destination | Reward | Description |
|---|---|---|---|---|
| STATIC | Green | CDN / Storage | $0.50 | Static file requests (images, CSS, JS) |
| READ | Blue | Replica / NoSQL / SQL DB | $0.80 | Database read operations |
| WRITE | Orange | NoSQL / SQL DB / Warehouse | $1.20 | Database write operations |
| UPLOAD | Yellow | Storage / Warehouse | $1.50 | File uploads |
| SEARCH | Cyan | Search Engine / SQL DB | $1.20 | Search queries (Search Engine preferred, SQL DB fallback) |
| MALICIOUS | Red | Blocked by Firewall / Identity Provider | $0 | DDoS attacks — block them or bleed reputation! |
| INFERENCE | Fuchsia | GPU Cluster (via Inference Gateway) | $0.50 | AI generation requests — batched on GPUs, with per-request generation length |
Build your architecture using the toolbar. All 26 services are organized into five category tabs — the same taxonomy as the table below. Each service has a cost, capacity, and per-minute upkeep:
| Category | Service | Cost | Capacity | Upkeep | Role |
|---|---|---|---|---|---|
| Front door | GeoDNS | $50 | 60 | $4/min | Front door for the whole site: splits traffic across independent regional stacks. |
| Front door | CDN | $60 | 50 | $5/min | Caches STATIC content at the edge (95% hit rate). |
| Front door | Firewall | $40 | 30 | $4/min | The first line of defense. Blocks malicious traffic. |
| Front door | Identity Provider | $55 | 20 | $6/min | Adds latency but catches session-based attacks a WAF misses. |
| Front door | API Gateway | $70 | 60 | $8/min | Rate limits traffic. Throttled requests lose less reputation than failures. Upgradeable T1–T3. |
| Front door | Load Balancer | $50 | 20 | $6/min | Distributes traffic to multiple Compute instances. |
| Compute | Compute | $60 | 4 | $12/min | Processes requests. Auto-scales into a fleet (with cold start). Upgradeable T1–T3. |
| Compute | Serverless Function | $45 | 30 | $2/min + $0.03/req | Auto-scales with traffic. Very low upkeep but pays per completed request — cheap when idle, expensive at high RPS. |
| Compute | Container Cluster | $120 | 12 | $16/min | Dense fixed capacity at a flat fee. Slow node-pool warmup on scale-out. |
| Compute | GPU Cluster | $300 | 8 | $60/min | Batches INFERENCE into one amortized job. Model cold-starts on placement and on every tier upgrade; draws 6 kW. Upgradeable T1–T3. |
| Compute | Inference Gateway | $70 | 10 (queue 20) | $5/min | Holds INFERENCE for warming/full GPUs, dispatches to the least-loaded one — and expires anything older than its 6s deadline. |
| Data | Relational DB | $150 | 8 | $24/min | Destination for READ/WRITE/SEARCH traffic. Upgradeable T1–T3. |
| Data | NoSQL DB | $80 | 15 | $14/min | Fast for READ/WRITE, but cannot handle SEARCH queries. Upgradeable T1–T3. |
| Data | Memory Cache | $60 | 30 | $8/min | Caches responses to reduce DB load. Upgradeable T1–T3. |
| Data | File Storage | $25 | 25 | $5/min | Destination for STATIC/UPLOAD traffic. |
| Data | Search Engine | $120 | 12 | $16/min | Specialized for SEARCH queries. 3× faster than SQL DB. Upgradeable T1–T3. |
| Data | Read Replica | $100 | 12 | $12/min | Offloads READ traffic from the master DB. Requires connection to a DB. Upgradeable T1–T3. |
| Data | Data Warehouse | $90 | 40 | $8/min | Stores analytics WRITEs cheaply and slowly. Cannot serve realtime READ. |
| Async | Message Queue | $45 | 50 (queue 200) | $3/min | Buffers requests during spikes. Prevents drops. |
| Async | Pub/Sub Topic | $65 | 30 | $6/min | Fan-out: one event becomes one delivery per subscriber. |
| Async | Stream | $90 | 40 (queue 200) | $10/min | High throughput, strictly ordered per partition. A stalled partition backs up its tail. |
| Async | Dead-Letter Queue | $55 | 25 | $4/min | Parks requests that finally failed, draining them back for a cost. |
| Async | Scheduler | $50 | 1 | $5/min | Injects its own scheduled batch-job bursts on a timer. |
| Async | Notification | $40 | 20 | $4/min | Terminal "send": success earns reputation, failures are silent. |
| Ops | Monitoring | $75 | 1 | $8/min | Unlocks the live metrics dashboard and alerts. |
| Ops | Substation | $150 | 1 | $8/min | +6 kW of grid capacity on the 8 kW base. GPUs draw 6 kW each and cannot be placed past the cap. |
| Action | Money | Score | Reputation |
|---|---|---|---|
| Static Request | +$0.50 | +3 | +0.1 |
| DB Read | +$0.80 | +5 | +0.1 |
| DB Write | +$1.20 | +8 | +0.1 |
| File Upload | +$1.50 | +10 | +0.1 |
| Search Query | +$1.20 | +5 | +0.1 |
| Inference | +$0.50 | +15 | +0.1 |
| GPU Bad Answer | - | - | -0.5 |
| Cache Hit | +20% reward | - | - |
| Attack Blocked | -$1 (mitigation) | +10 | - |
| Request Failed | - | -half | -1 |
| Req. Throttled | - | - | -0.2 |
| Attack Leaked | -$50 (breach) | - | -5 |
The core experience - survive as long as possible against escalating traffic with constant intervention required:
25 levels across 5 chapters, each one a scenario built around a single lesson:
Levels come with pre-built starting architectures, primary and bonus objectives, speedrun stars, and a debrief tip. Later chapters throw forced outages — including a whole region going dark — at your build.
A fully customizable testing environment for experimenting with any architecture:
| Control | Description |
|---|---|
| Budget | Set any starting budget (slider 0-10K, or type any amount) |
| RPS | Control traffic rate (0 = stopped, or type 100+ for stress tests) |
| Traffic Mix | Adjust all 7 traffic type percentages independently |
| Burst | Spawn instant bursts of specific traffic types |
| Upkeep Toggle | Enable/disable service costs |
| Clear All | Reset all services and restore budget |
No game over in Sandbox - experiment freely!
Built something you're proud of? The share panel exports your architecture two ways:
?arch= link; anyone who opens it gets your architecture loaded and ready to run.R to reset the camera position.T to switch between isometric and top-down view.H to toggle UI panels.1-5 switch between them.V Select, C Link, X Demolish, U Unlink. Each key is shown in the corner of its button.R.Q/E) and the top-down toggle (T) are keyboard-only for now.src/, no bundler)To play, click PLAY NOW. No install, no build, no account.
To run your own copy — a fork, or a change you just made — serve the folder
instead of opening the file. The game is native ES modules, and browsers fetch
module scripts in CORS mode, so a file:// origin is blocked and
double-clicking index.html gets you the UI shell over an empty canvas. Any
static server works, and one is already on your machine:
git clone https://github.com/pshenok/server-survival.git
cd server-survival
python3 -m http.server 8000 # then open http://localhost:8000
There is still zero build step — the dev tooling is optional and for contributors only:
npm install once, then use npm run check to run ESLint and the full Vitest suite.game.js plus focused modules under src/ (sim/, core/, ui/, campaign/, persistence/, input/).See CONTRIBUTING.md for the workflow.
Join our Discord server to discuss strategies and share your high scores: Join Discord
Built with code and chaos.
(top 24 of 36)
1,673 followers · starred Jan 2026
247 followers · starred Dec 2025
515 followers · starred Jul 2026
972 followers · starred Dec 2025
Tower defense game that teaches cloud architecture. Build infrastructure, survive traffic, learn scaling.
See the code
Server Survival is an interactive 3D simulation game where you play as a Cloud Architect. Your mission is to build and scale a resilient cloud infrastructure to handle increasing traffic loads while fighting off DDoS attacks, managing your budget, and keeping your services healthy.
Learn cloud by playing:
🏭 New: Datacenter Survival — the sister game. This one teaches the logical layer of the cloud; that one teaches the physical layer it runs on: power chains, heat, cooling, PUE. Play it here.
Every mechanic is a real cloud concept in miniature:
Survive as long as possible! Manage your Budget ($), Reputation (%), and Service Health.
| Traffic | Color | Destination | Reward | Description |
|---|---|---|---|---|
| STATIC | Green | CDN / Storage | $0.50 | Static file requests (images, CSS, JS) |
| READ | Blue | Replica / NoSQL / SQL DB | $0.80 | Database read operations |
| WRITE | Orange | NoSQL / SQL DB / Warehouse | $1.20 | Database write operations |
| UPLOAD | Yellow | Storage / Warehouse | $1.50 | File uploads |
| SEARCH | Cyan | Search Engine / SQL DB | $1.20 | Search queries (Search Engine preferred, SQL DB fallback) |
| MALICIOUS | Red | Blocked by Firewall / Identity Provider | $0 | DDoS attacks — block them or bleed reputation! |
| INFERENCE | Fuchsia | GPU Cluster (via Inference Gateway) | $0.50 | AI generation requests — batched on GPUs, with per-request generation length |
Build your architecture using the toolbar. All 26 services are organized into five category tabs — the same taxonomy as the table below. Each service has a cost, capacity, and per-minute upkeep:
| Category | Service | Cost | Capacity | Upkeep | Role |
|---|---|---|---|---|---|
| Front door | GeoDNS | $50 | 60 | $4/min | Front door for the whole site: splits traffic across independent regional stacks. |
| Front door | CDN | $60 | 50 | $5/min | Caches STATIC content at the edge (95% hit rate). |
| Front door | Firewall | $40 | 30 | $4/min | The first line of defense. Blocks malicious traffic. |
| Front door | Identity Provider | $55 | 20 | $6/min | Adds latency but catches session-based attacks a WAF misses. |
| Front door | API Gateway | $70 | 60 | $8/min | Rate limits traffic. Throttled requests lose less reputation than failures. Upgradeable T1–T3. |
| Front door | Load Balancer | $50 | 20 | $6/min | Distributes traffic to multiple Compute instances. |
| Compute | Compute | $60 | 4 | $12/min | Processes requests. Auto-scales into a fleet (with cold start). Upgradeable T1–T3. |
| Compute | Serverless Function | $45 | 30 | $2/min + $0.03/req | Auto-scales with traffic. Very low upkeep but pays per completed request — cheap when idle, expensive at high RPS. |
| Compute | Container Cluster | $120 | 12 | $16/min | Dense fixed capacity at a flat fee. Slow node-pool warmup on scale-out. |
| Compute | GPU Cluster | $300 | 8 | $60/min | Batches INFERENCE into one amortized job. Model cold-starts on placement and on every tier upgrade; draws 6 kW. Upgradeable T1–T3. |
| Compute | Inference Gateway | $70 | 10 (queue 20) | $5/min | Holds INFERENCE for warming/full GPUs, dispatches to the least-loaded one — and expires anything older than its 6s deadline. |
| Data | Relational DB | $150 | 8 | $24/min | Destination for READ/WRITE/SEARCH traffic. Upgradeable T1–T3. |
| Data | NoSQL DB | $80 | 15 | $14/min | Fast for READ/WRITE, but cannot handle SEARCH queries. Upgradeable T1–T3. |
| Data | Memory Cache | $60 | 30 | $8/min | Caches responses to reduce DB load. Upgradeable T1–T3. |
| Data | File Storage | $25 | 25 | $5/min | Destination for STATIC/UPLOAD traffic. |
| Data | Search Engine | $120 | 12 | $16/min | Specialized for SEARCH queries. 3× faster than SQL DB. Upgradeable T1–T3. |
| Data | Read Replica | $100 | 12 | $12/min | Offloads READ traffic from the master DB. Requires connection to a DB. Upgradeable T1–T3. |
| Data | Data Warehouse | $90 | 40 | $8/min | Stores analytics WRITEs cheaply and slowly. Cannot serve realtime READ. |
| Async | Message Queue | $45 | 50 (queue 200) | $3/min | Buffers requests during spikes. Prevents drops. |
| Async | Pub/Sub Topic | $65 | 30 | $6/min | Fan-out: one event becomes one delivery per subscriber. |
| Async | Stream | $90 | 40 (queue 200) | $10/min | High throughput, strictly ordered per partition. A stalled partition backs up its tail. |
| Async | Dead-Letter Queue | $55 | 25 | $4/min | Parks requests that finally failed, draining them back for a cost. |
| Async | Scheduler | $50 | 1 | $5/min | Injects its own scheduled batch-job bursts on a timer. |
| Async | Notification | $40 | 20 | $4/min | Terminal "send": success earns reputation, failures are silent. |
| Ops | Monitoring | $75 | 1 | $8/min | Unlocks the live metrics dashboard and alerts. |
| Ops | Substation | $150 | 1 | $8/min | +6 kW of grid capacity on the 8 kW base. GPUs draw 6 kW each and cannot be placed past the cap. |
| Action | Money | Score | Reputation |
|---|---|---|---|
| Static Request | +$0.50 | +3 | +0.1 |
| DB Read | +$0.80 | +5 | +0.1 |
| DB Write | +$1.20 | +8 | +0.1 |
| File Upload | +$1.50 | +10 | +0.1 |
| Search Query | +$1.20 | +5 | +0.1 |
| Inference | +$0.50 | +15 | +0.1 |
| GPU Bad Answer | - | - | -0.5 |
| Cache Hit | +20% reward | - | - |
| Attack Blocked | -$1 (mitigation) | +10 | - |
| Request Failed | - | -half | -1 |
| Req. Throttled | - | - | -0.2 |
| Attack Leaked | -$50 (breach) | - | -5 |
The core experience - survive as long as possible against escalating traffic with constant intervention required:
25 levels across 5 chapters, each one a scenario built around a single lesson:
Levels come with pre-built starting architectures, primary and bonus objectives, speedrun stars, and a debrief tip. Later chapters throw forced outages — including a whole region going dark — at your build.
A fully customizable testing environment for experimenting with any architecture:
| Control | Description |
|---|---|
| Budget | Set any starting budget (slider 0-10K, or type any amount) |
| RPS | Control traffic rate (0 = stopped, or type 100+ for stress tests) |
| Traffic Mix | Adjust all 7 traffic type percentages independently |
| Burst | Spawn instant bursts of specific traffic types |
| Upkeep Toggle | Enable/disable service costs |
| Clear All | Reset all services and restore budget |
No game over in Sandbox - experiment freely!
Built something you're proud of? The share panel exports your architecture two ways:
?arch= link; anyone who opens it gets your architecture loaded and ready to run.R to reset the camera position.T to switch between isometric and top-down view.H to toggle UI panels.1-5 switch between them.V Select, C Link, X Demolish, U Unlink. Each key is shown in the corner of its button.R.Q/E) and the top-down toggle (T) are keyboard-only for now.src/, no bundler)To play, click PLAY NOW. No install, no build, no account.
To run your own copy — a fork, or a change you just made — serve the folder
instead of opening the file. The game is native ES modules, and browsers fetch
module scripts in CORS mode, so a file:// origin is blocked and
double-clicking index.html gets you the UI shell over an empty canvas. Any
static server works, and one is already on your machine:
git clone https://github.com/pshenok/server-survival.git
cd server-survival
python3 -m http.server 8000 # then open http://localhost:8000
There is still zero build step — the dev tooling is optional and for contributors only:
npm install once, then use npm run check to run ESLint and the full Vitest suite.game.js plus focused modules under src/ (sim/, core/, ui/, campaign/, persistence/, input/).See CONTRIBUTING.md for the workflow.
Join our Discord server to discuss strategies and share your high scores: Join Discord
Built with code and chaos.
(top 24 of 36)
1,673 followers · starred Jan 2026
247 followers · starred Dec 2025
515 followers · starred Jul 2026
972 followers · starred Dec 2025