TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How does Reddits' real-time upvote counter work?

1 pointsby farouqaldoriover 4 years ago
Example gif: https:&#x2F;&#x2F;i.imgur.com&#x2F;3rh9tz5.gif<p>Reddit recently introduced counters on all posts that update &quot;in real time&quot; the upvote and comment counter for any given post.<p>The fact that there are multiple posts on a single page with millions of active users at any given moment, results in tens millions of requests being sent back and fourth &quot;just&quot; to show a cool looking counter component.<p>This simple looking counter must have some level of complexity behind it, which made me curious about how it works.<p>I&#x27;ve been trying to reverse engineer it with Fiddler for the last 30 minutes with no success, so I figured that I should ask here.<p>How does it work from a technical point of view?

1 comment

ev1over 4 years ago
This comment on Reddit says it&#x27;s fake, and it just arbitrarily starts the counter lower than the current score and slowly counts up to the current score to fake activity.<p>Includes source.<p><a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;assholedesign&#x2F;comments&#x2F;jqazmu&#x2F;reddits_fake_upvote_counter_makes_it_look_like&#x2F;gbtq4db&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;assholedesign&#x2F;comments&#x2F;jqazmu&#x2F;reddi...</a><p><pre><code> initialDisplayCount: o - s, countToUpperBound: o, initialDelay: k, subsequentRecurringDelay: _, incrementDelta: m,</code></pre>
评论 #25075932 未加载