Strategy · Tower Defense
Server Survival
Place firewalls, load balancers, caches, and databases like defensive towers in a Three.js cloud simulator, routing color-coded web traffic and absorbing DDoS waves.
Overview
Place servers, caches, and load balancers like towers and the cloud bill becomes the wave you defend against — every colored packet of simulated web traffic you fail to route pushes the site's reputation a notch closer to zero. This Three.js tower defense by pshenok hands you the role of a cloud architect building infrastructure on a 3D board: firewall, load balancer, queue, compute, CDN, cache, SQL and NoSQL databases, search engine, read replica, storage, even a pay-per-request serverless function, each with its own cost, capacity, and per-minute upkeep. Traffic arrives in six colors — green static files, blue reads, orange writes, yellow uploads, cyan searches, and red DDoS packets that the firewall must catch or your reputation bleeds five points per leak. Served requests pay you and lift reputation; dropped ones cost you, and the run ends the moment reputation hits zero or the balance sinks to -$1000. Built in vanilla JavaScript with Three.js rendering and a glassmorphic Tailwind UI, it ships with a Survival mode of escalating spikes and a fully configurable Sandbox, and it is the rare tower defense that teaches real web-architecture instincts — CDN hit rates, cache tiers, read replicas, graceful degradation — by forcing you to place them under fire.
How to Play
The objective is to survive as long as possible while keeping budget, reputation, and service health above zero. Left-click selects a service from the toolbar and places it on the board; with the Connect tool, left-click two nodes in sequence to wire them, and flow direction matters — valid chains run Internet to Firewall to Load Balancer to Queue to Compute to Cache to Database or Storage. Right-click and drag pans the camera, the scroll wheel zooms, and WASD or Arrow keys pan when zoomed in. Press R to reset the camera, T to toggle between isometric and top-down views, H to hide the HUD, and ESC to open the menu and pause. The time controls let you Pause, play at 1x, or fast-forward at 3x, so you can think during a burst and rush through a calm stretch.
Tips & Strategy
Always place a Firewall connected to the Internet first — a single leaked DDoS packet costs five reputation, the steepest penalty in the economy, and an early leak is effectively unrecoverable. Wire Internet to CDN to Storage as your second move so the cheap, high-volume static traffic is absorbed at the edge with a 95% hit rate instead of clogging compute. Watch the event bar at the top: cost spikes mean defer every purchase you can, and traffic bursts mean you should already have a Queue buffering 200 requests ahead of your compute tier. Split database load by routing READ and WRITE to NoSQL (150ms, cheaper) and reserving SQL for SEARCH, or add a dedicated Search Engine that handles SEARCH traffic three times faster than the SQL DB. An API Gateway turns hard failures into soft -0.2 reputation throttles instead of -1.0 drops, making it the right answer to sustained spikes — and as RPS multiplies at the one- and three-minute milestones, prefer a Compute node for steady throughput over the Serverless Function, whose $0.03-per-request pricing quietly bankrupts you at high volume.
Controls
- Keyboard
- WASD or Arrow keys — pan camera when zoomed inESC — open menu and pauseR — reset camera positionT — toggle isometric/top-down viewH — toggle HUD panels
- Mouse
- Left-click to select, place, and connect services (click two nodes to wire them; flow direction matters); right-click and drag to pan; scroll to zoom
Features
- 13 placeable infrastructure services with upgradeable tiers — Firewall, API Gateway, Queue, Load Balancer, Compute, Serverless Function, CDN, SQL DB, NoSQL DB, Cache, Search, Read Replica, Storage
- Six color-coded traffic types (static, read, write, upload, search, malicious DDoS) with distinct routing destinations and rewards
- Real-time economy tracking budget, reputation, and per-service health that degrades under load and needs repair
- Survival mode with escalating milestones and random cost-spike events, plus a fully configurable no-fail Sandbox
- Three.js 3D rendering with a glassmorphic Tailwind UI; built in vanilla JavaScript with no build step