TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

1 点作者 farouqaldori超过 4 年前
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

ev1超过 4 年前
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 未加载