Skip to main content

Handling 500 Million Clicks with a $4 VPS

[HPP] Pieter LevelsAugust 23, 202513 min
7 connections·13 entities in this video→

Accidental Viral Success

  • πŸ’‘ A simple lizard click website, created in just 10 minutes based on a TikTok trend, unexpectedly went viral.
  • πŸš€ Within 24 hours, the site garnered over a million unique visitors and 300 million API requests.
  • πŸ“ˆ The project, lizard.click, eventually handled over 600 million clicks in about 15 days.

Initial Scaling Challenges

  • πŸ’Έ The initial setup on a $4/month DigitalOcean VPS with Express.js and SQLite struggled under the load.
  • ⚠️ Response times skyrocketed to 10-15 seconds, with many requests timing out and clicks not being recorded.
  • πŸ“Š The server experienced hundreds of requests per second, leading to storage issues from piling EngineX access logs.

Why the Web Platform?

  • 🌐 The speaker chose the web over mobile apps for its ability to move fast and implement instant updates.
  • βœ… This approach avoids the red tape, approval processes, and fees associated with app stores.
  • πŸ› οΈ The web offers ownership of domain, server, and code, allowing developers to push updates freely.

Refactoring for Efficiency

  • 🧠 Instead of just upgrading the server, the speaker refactored the database interaction to keep click counts in memory.
  • πŸ”„ Database updates were changed from per-request to periodic writes (every few seconds), significantly reducing CPU, memory, and disk I/O.
  • πŸ“‰ This optimization allowed the application to scale back down to the $4/month VPS, handling over 2,000 requests per second at its peak.

Rethinking Modern Scaling

  • 🚫 The speaker challenges the notion that all projects need immediate, complex scaling solutions like serverless or edge computing.
  • πŸ’° Argues that most personal projects can thrive on a cheap $4/month VPS without incurring "surprise pricing" from free-tier jumps.
  • 🎯 A fixed-cost VPS provides predictable spending compared to potentially expensive usage-based cloud platforms for viral spikes.

The Value of Simplicity

  • πŸ›‘ The speaker declined feature requests to preserve the site's original, simple purpose.
  • ✨ Advocates for building single-function websites reminiscent of the early internet, focusing on personal expression rather than monetization.
  • πŸ’– Emphasizes that web development can be a learning experience and a way to contribute to a more diverse and less "walled garden" internet.
Knowledge graph13 entities Β· 7 connections

How they connect

An interactive map of every person, idea, and reference from this conversation. Hover to trace connections, click to explore.

Hover Β· drag to explore
13 entities
Chapters7 moments

Key Moments

Transcript50 segments

Full Transcript

Topics14 themes

What’s Discussed

Viral WebsitesVPSWeb DevelopmentExpress.jsSQLite DatabaseCode RefactoringServer ScalingIn-Memory DataApp Store ApprovalFree TiersData OwnershipPersonal ProjectsWeb PlatformDigitalOcean
Smart Objects13 Β· 7 links
ProductsΒ· 4
CompaniesΒ· 2
MediaΒ· 1
PersonΒ· 1
ConceptsΒ· 5