Playground · Easy line · Station E4
"Users viewing this page" counter
Count live viewers per page from 6,000 heartbeats a second, with stale viewers expiring by themselves.
A hotel site shows "12 people are looking at this hotel" to nudge travellers. Every open tab sends a heartbeat every 10 seconds: 6,000 a second. Pages ask for the count 4,000 times a second. If a tab closes, its viewer should drop off within seconds without anyone cleaning up.
- Heartbeats
- 6,000/s
- Viewer counts
- 4,000/s
- Budget
- $750/mo
- Speed
- under 100 ms
- Must
- Survive a crash
Reported in interviews at Booking.com