The video documents an experiment to measure the maximum number of concurrent users a $12 VPS (1 shared CPU, 2GB RAM) could support using a simple Twitter-like API implemented in eight different programming languages. The creator established a baseline with Node.js and compared it against others using a standardized workload (approx. 0.1 requests/sec per user) and strict performance criteria (P95 < 0.5s, P99 < 1s, Error rate < 1%). The results highlighted a massive disparity in capacity, ranging from a few hundred users (PHP/Laravel) to several thousand (Rust/Go), and demonstrated how the bottleneck shifts from the language to the database as efficiency increases.
Historic Context, Facts, and Persons
- Key Person: The video creator, a software engineer and developer of the DevMax system design app.
- Technical Setup:
- Hardware: VPS with 1 shared CPU, 2GB RAM, 50GB Storage.
- Software Stack: Nginx, PostgreSQL (initially), and the language-specific backend.
- Test Tool: K6 for simulating virtual users.
- Dataset: 50k users, 500k posts, 2M+ likes (~350MB database).
- The “Leaderboard” (Rough Tiers):
- Tier 1 (High): Rust (~6,900 users), Go (~6,500 users).
- Tier 2 (Mid-High): Java (~5,100), C# (~4,400), Bun (~4,200).
- Tier 3 (Mid): Node.js (~3,250).
- Tier 4 (Low): Python (~2,150), PHP/Laravel (~750).
Technical Discoveries and Consequences
1. Application Layer Overhead
- Discovery: Framework “boot up” time is a critical factor for lightweight APIs. Laravel’s process model (rebooting for every request) significantly hampered performance compared to bare PHP or Laravel Octane.
- Consequence: Choosing a lightweight runtime or a persistent process model (like Bun or Go) can increase capacity by several multiples without changing the core business logic.
2. The Database Wall
- Discovery: As the language efficiency increases (specifically with Go and Rust), the CPU bottleneck shifts from the application process to the database process (PostgreSQL).
- Consequence: In high-performance stacks, optimizing the code provides diminishing returns; focus must shift to database tuning or architectural changes.
3. Embedded vs. Client-Server Databases
- Discovery: Removing the Inter-Process Communication (IPC) overhead by replacing PostgreSQL with SQLite (in write-ahead log mode) dramatically boosted throughput.
- Consequence: For single-machine deployments, embedded databases can allow the application to scale far beyond the limits of a traditional client-server DB setup. Rust with SQLite reached a peak of 14,050 concurrent users on the same $12 server.
Final Conclusion
The choice of programming language and framework has a profound impact on infrastructure costs and scalability. While high-level languages are convenient, they introduce overhead that manifests as a hard limit on concurrent users per unit of hardware. Once an efficient language is chosen, the database becomes the primary bottleneck.