Handling 500M clicks with a $4 VPS

Andrew Schmelyun
23 Aug 202513:14

Summary

TLDRIn this video, the creator shares the journey of building a simple, viral website called lizard.click, which features a clickable lizard emoji that plays a sound and tracks user clicks. Despite starting as a small, silly project, it quickly went viral, attracting millions of users and overwhelming the server. The creator reflects on the scalability challenges, the decision to keep the project web-based, and the personal satisfaction of maintaining ownership over the project. The video emphasizes the beauty of small web projects, the importance of learning through experimentation, and staying true to creative ideas without monetizing them.

Takeaways

  • 😀 The website 'lizard.click' became viral within 24 hours, attracting millions of visitors and over 300 million API requests.
  • 🐍 The site features a button with a lizard emoji, and each click generates more lizard emojis and tracks all user clicks.
  • 🔧 The website was built quickly using basic web technologies: HTML, CSS, JavaScript, and a simple SQLite database.
  • 📱 The project was inspired by a TikTok trend featuring a lizard animation from Pixar's movie *Elio*.
  • 💻 The website was initially hosted on a $4/month DigitalOcean droplet but had to scale up as traffic grew.
  • 🖥️ The author emphasizes the flexibility of the web as a platform, allowing fast iteration and updates without the red tape of mobile app stores.
  • 📊 The initial scaling involved increasing the server size, but that only offered a temporary fix before further optimization was necessary.
  • ⚡ The main issue causing slow response times was frequent database writes, which were eventually optimized by storing click counts in memory and updating the database periodically.
  • 💡 By refactoring the code, the author reduced resource usage significantly, allowing the server to handle over 2,000 requests per second on a low-cost plan.
  • 🤖 The author reflects on the common misconception that all web projects need to be highly scalable or use serverless architectures, suggesting that many personal projects can run on low-cost servers.
  • 🌐 The project was built purely for fun, with no ads or monetization, focusing on providing a lighthearted experience and maintaining the simplicity of the web's early days.

Q & A

  • What is the core concept behind the lizard.click website?

    -The lizard.click website features a button with a lizard emoji. When clicked, it plays a sound and displays multiple lizards on the screen, while tracking clicks from all visitors to the site.

  • How did the lizard.click website become viral?

    -The website went viral after the creator posted a TikTok showcasing the simple, fun concept of the site. The video gained traction, and the site quickly gained over a million unique visitors and millions of requests to its API.

  • What challenges did the creator face when scaling the website?

    -The main challenge was handling the overwhelming number of requests, which led to slow response times and many requests timing out. The initial server could not handle the massive traffic spikes, leading to the need for scaling up the hosting.

  • What solution did the creator implement to handle the scaling issues?

    -The creator refactored the application by moving the click tracking into memory, updating the database periodically rather than with every single request. This reduced the strain on the server, allowing it to handle more requests efficiently.

  • Why did the creator choose to use a DigitalOcean droplet instead of cloud services?

    -The creator preferred a DigitalOcean droplet because it allowed for predictable costs ($4/month), without the surprise pricing or complexity of cloud services. This simplicity suited the creator's needs for a small, personal project.

  • What technical aspects did the creator optimize in the server?

    -The creator optimized the server by turning off access logs, reducing unnecessary disk writes, and refactoring the way the database was updated—moving from per-request updates to periodic updates stored in memory.

  • What were some of the feature requests from users, and how did the creator respond?

    -Users requested features like leaderboards, user accounts, and the ability to upload custom emojis or sounds. The creator declined these requests, emphasizing that the project was intended to remain simple and true to its original purpose.

  • What was the creator's perspective on scaling in web development?

    -The creator believes that not all projects need to be heavily scaled. For small personal projects, a simple server (like the $4/month DigitalOcean droplet) is often enough, and the focus should be on maintaining simplicity and fun rather than unnecessary scalability.

  • Why did the creator choose not to monetize the website despite its popularity?

    -The creator chose not to monetize the website through ads or other means, believing that it would compromise the clean, simple aesthetic of the site. The goal was to provide a fun, interactive experience rather than a revenue-generating one.

  • What lesson does the creator want to convey to aspiring web developers?

    -The creator encourages web developers to build small, fun projects for the web. These projects can be a great way to showcase personality, learn, and share something meaningful with others. The focus should be on enjoying the process and the freedom that the web allows.

Outlines

plate

Этот раздел доступен только подписчикам платных тарифов. Пожалуйста, перейдите на платный тариф для доступа.

Перейти на платный тариф

Mindmap

plate

Этот раздел доступен только подписчикам платных тарифов. Пожалуйста, перейдите на платный тариф для доступа.

Перейти на платный тариф

Keywords

plate

Этот раздел доступен только подписчикам платных тарифов. Пожалуйста, перейдите на платный тариф для доступа.

Перейти на платный тариф

Highlights

plate

Этот раздел доступен только подписчикам платных тарифов. Пожалуйста, перейдите на платный тариф для доступа.

Перейти на платный тариф

Transcripts

plate

Этот раздел доступен только подписчикам платных тарифов. Пожалуйста, перейдите на платный тариф для доступа.

Перейти на платный тариф
Rate This

5.0 / 5 (0 votes)

Связанные теги
Web DevelopmentViral ProjectsServer ScalingTech ChallengesSimple IdeasWeb ProjectsPersonal WebsitesAPI DesignExpress.jsTech HumorInternet Culture
Вам нужно краткое изложение на английском?