Scaling One Million Checkboxes to 650M checks

todsacerdoti | 237 points

Many lessons learned along with great historical knowledge of (distributed) systems.

I think you hit every type of interruption and point of failure, except storage space, and it is great to see your resolutions.

I wasn't aware Redis could do the Lua stuff which makes me very interested in using it as an alternative state.

As for the bandwidth - one of my biggest gripes with cloud services as there is no hard limit to avoid billing overages.

pizzafeelsright | 3 months ago

This was a fantastic writeup!!! Congratulations on the website. To me, though, the writeup is what you should be most proud of!!

jorl17 | 3 months ago

> Building the site in two days with little regard for scale was a good choice.

Probably the key takeaway that many early-career engineers need to learn. Scaling's not a problem until it's a problem. At that point, it's a good problem t have, and it's not as hard to fix as you might think anyway.

xnx | 3 months ago

Recent and related:

One Million Checkboxes - https://news.ycombinator.com/item?id=40800869 - June 2024 (305 comments)

dang | 3 months ago

These are fun projects. About six years ago I launched Pixmap on android, which is a little collaborative pixel editing app, supporting larger images (like 1024x1024 grids etc). I had a queue that would apply each event to png images, and then clients would load the initial PNG on connect, and then each pixel draw event is just one small object sent to the client. This way I could take advantage of image compression on initial load, and then the change sets are very small. Also, since each event is stored in a log, you can "rewind" the images [0].

[0] 22mb: https://blog.winricklabs.com/images/pixmap-rewind-demo.gif

winrid | 3 months ago

Nice write up - curious much did it end up costing?

xivzgrev | 3 months ago

As someone new to backend - is there a simple alternative architecture for this project? I hope there's an easier way to host a million bits of state and sync with clients. Some of the solutions in the post went over my head.

Kudos to the author - your projects are great.

wonger_ | 3 months ago

Awesome !

Will your next post be a statistical analysis of which checkboxes' were the less/most checked ?

I remember scrolling way down and being kind of sad that the one I choose was almost instantly unchecked.

whynotmaybe | 3 months ago

Is the game still live?

When I go to https://onemillioncheckboxes.com/ nothing is checked and in the JS console I just see

{"total":0,"totalGold":0,"totalRed":0,"totalGreen":0,"totalPurple":0,"totalOrange":0,"recentlyChecked":false}

geek_at | 3 months ago

Here's the opposite of your scalable implementation: 1mil checkboxes in under 1000 characters! (Deno)

https://gist.github.com/jeff-hykin/4cdebafd8698298d021f103e2...

huem0n | 3 months ago

> This also validated my belief that people are hungry for constrained anonymous interactions with strangers.

creativenolo | 3 months ago

This project won't be complete until it supports the elusive "indeterminate" state of the checkbox.

butz | 3 months ago

TIL you can run Lua scripts on your Redis server. That's so nice, I never knew!

isoprophlex | 3 months ago

Really cool, awesome followup to the original project.

junon | 3 months ago

Would you be willing to share your nginx config?

j0hnyl | 3 months ago
[deleted]
| 3 months ago