explaingit

pshenok/server-survival

5,663JavaScriptAudience · developerComplexity · 1/5Setup · easy

TLDR

A browser game where you build and scale cloud infrastructure, firewalls, load balancers, CDNs, and databases, to handle traffic waves and survive DDoS attacks while staying within budget.

Mindmap

mindmap
  root((server-survival))
    Gameplay
      Build infrastructure
      Handle traffic waves
      Survive DDoS attacks
      Manage budget
    Components
      Firewall
      Load balancer
      CDN
      Serverless functions
    Traffic types
      Static files
      Database reads
      File uploads
      Attack traffic
    Learning outcomes
      CDN tradeoffs
      Queue buffering
      Scaling decisions
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Play through escalating traffic waves to learn when adding a CDN saves money versus when it adds unnecessary cost.

USE CASE 2

Practice real-time decisions about load balancers, queues, and serverless functions without needing a real cloud account.

USE CASE 3

Use the game as a teaching tool to explain cloud architecture tradeoffs to junior developers or students in a hands-on way.

USE CASE 4

Understand why a firewall and API gateway are the first two components to deploy before serving real user traffic.

Tech stack

JavaScript

Getting it running

Difficulty · easy Time to first run · 5min
No license information was provided, check the repository directly for usage terms.

In plain English

Server Survival is a browser-based 3D simulation game where you play as a cloud architect. Your job is to build and scale a working infrastructure that handles incoming web traffic while surviving DDoS attacks, staying within budget, and keeping your services healthy. The game is playable directly in a browser at no cost. Traffic in the game arrives in colored streams representing different request types: static file requests, database reads and writes, file uploads, search queries, and malicious attack traffic. Each type must reach the appropriate service in your infrastructure to generate revenue. Malicious traffic drains your reputation if it is not blocked. Your reputation, budget, and service health are the three meters that determine whether you survive or fail. You build your infrastructure using a toolbar of components, each with a purchase cost, ongoing upkeep cost, and traffic capacity. The available components include a firewall (blocks malicious traffic), an API gateway with rate limiting and upgrade tiers, a queue that buffers request spikes, a load balancer that distributes traffic across multiple instances, standard compute servers, serverless functions (pay-per-request with very low idle cost), a CDN for static content, SQL and NoSQL databases, object storage, a search engine service, and a Redis cache. The design of the game maps directly to real cloud architecture decisions: when to add a CDN to offload static traffic, when a queue prevents drops during a spike, how load balancers interact with compute scaling, and why serverless functions become expensive at high request rates. Playing through the escalating waves teaches these tradeoffs through consequence rather than lectures. The game ends when your reputation falls to zero or your budget drops below negative one thousand dollars. Surviving longer requires both building the right topology and managing ongoing costs.

Copy-paste prompts

Prompt 1
I'm stuck on a difficult wave in Server Survival where DDoS traffic overwhelms my firewall. My layout is firewall then API gateway then 2 servers. What topology should I build to survive the attack?
Prompt 2
Explain how Server Survival models the cost tradeoff between serverless functions and standard compute servers at high request volumes so I can apply it to a real AWS architecture decision.
Prompt 3
I want to add a new component to the Server Survival game: a WAF that blocks specific attack patterns. Here's the existing component code, walk me through extending it.
Prompt 4
I'm teaching a cloud architecture workshop. Design a Server Survival exercise that teaches load balancer placement and database tier decisions to an audience of non-technical PMs.
Prompt 5
I finished the game but want to replay with a strict budget constraint. Is there a config or cheat code to start with less money and force efficient architecture choices?
Open on GitHub → Explain another repo

← pshenok on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.