The votes: what is going on

bentossell.com/devices · had / wanted · 7 pictures, no jargon

01 · Today

Every vote is a paper slip in a box

You tap "had" on a device. A slip goes into a box that here.now keeps for the site. The slip is never counted up. It just sits there.

had ✓ votes
180 slips in the box right now1 slip = 1 tap
02 · Today

To show a number, every visitor empties the box and counts

There is no running total. Each phone that opens the page downloads all the slips and adds them up itself. Then it does it again every minute.

votes 180 180 180 every visitor all the slips every minute
works fine at 180 slipsthis is the weak spot
03 · Why you saw "Counts unavailable"

The box has a doorman: 120 visits per hour, per house

I set that limit to stop spam. But reading counts uses the same door as voting. One open tab, refreshing every minute, uses up all 120 by itself. My testing from your house finished it off. It resets on the hour. No votes were lost.

the door 120 / hour your tabs, your tests, your house 121st: no
1 tab × 60 min × 2 requests = 120what you hit today
04 · If the site takes off

The box holds 25,000 slips. Then it is full.

A voter who taps ten devices adds ten slips. So the box fills at around 2,500 voters, not 100,000. When it is full, nobody can vote.

25k votes new votes bounce
≈ 2,500 voters fills ithard wall
05 · If the site takes off

And long before that, reads collapse

At 25,000 slips, every visitor downloads 5 MB and makes 250 requests just to see a number. The doorman turns them away in seconds. The page says "Counts unavailable" for everyone.

now 2 requests · 40 KB full box 250 requests · 5 MB · per visitor · every minute
same picture as 02, just biggerbreaks around 1,000 voters
06 · I read the here.now docs

here.now cannot count for us

I looked for a built-in way out. There is no "add these up" feature, no filter, no bigger box, no scheduled jobs. Three things it does have are useful, though.

not there

Count or filter slips
Scheduled jobs / server code
Box larger than 25,000
Separate limits for reading and voting

there

Raise the doorman's number
Publish a file with the totals in it (files have no doorman)
A "proxy route" that lets the site talk to an outside service with the key kept secret

07 · Proposal, part one · today

Three small changes. Fixes what you saw.

Good for a few thousand voters. About an hour of work, no new systems.

1 Doorman lets 600 in, not 120 one line in a config file 2 Ask for counts every 5 min, not every 1 and when you come back to the tab 3 Remember the last count if the doorman says no, keep showing it. Never "unavailable".
5× fewer knocks on the door, 5× bigger limit25× headroom
08 · Proposal, part two · when it takes off

Keep a tally board instead of a box of slips

A tiny service (Cloudflare, free tier) holds one number per device. A vote nudges a number. Visitors read 87 numbers, not 25,000 slips. Nothing on the site changes except two web addresses. Existing votes move over in one go.

had ✓ tally iPod8 Nokia 33107 Game Boy6 Furby5 → 6 … 87 rows total 87 tiny read
millions of votes, no box, no doorman problem100k voters: fine
09 · Recommendation

Do part one now. Do part two if the site takes off.

Part one is safe, small, and makes the error you saw go away. Part two is the real answer at scale, and it is roughly the same effort as any workaround built inside here.now, so there is no point doing the workaround.