Since there's a link to 'unvote' next to the option that I chose, I can only assume that this poll is not anonymous and that my choice is stored with my username somewhere on HN's server.
It could also be cookie-based, but something to keep in mind if you have privacy concerns.
How would a better implementation of this work? They definitely need to store your username somewhere to prevent the same user from voting multiple times.
I imagine they could simply keep track of whether you voted or not, and not which specific choice you made. That way your choice remains private but we would not be able to show even you which choice you made.
I’m sure Reddit tracks each upvote and downvote individually and doesn’t just increment a score counter somewhere.
Votes on HN aren't anonymous in that sense. I don't think that polls should be treated differently than other kinds of upvotes, which already are very intimate data. We take protecting that data and keeping it private very seriously, but of course there's some risk in any such arrangement, so if you don't want any risk, your best bet is not to vote on HN.
It could also be cookie-based, but something to keep in mind if you have privacy concerns.