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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Question: Computing Messages per Second

3 点作者 amrith超过 7 年前
I&#x27;m trying to rationalize this in my head, any help is welcome.<p>&quot;1 million individuals, each participate in 3 text message conversations per hour.<p>Each text message conversation involves 6 text messages over a 300 second (5 minute) period.<p>You are designing a system to handle this load. What is the number of text messages per second being generated, why?&quot;<p>Here&#x27;s my reckoning<p><pre><code> 1 million x 3 text conversations&#x2F;hour x 1&#x2F;3600 x 6 messages per second </code></pre> But, that doesn&#x27;t reflect the fact that each exchange lasts 5 minutes and therefore each text conversation only produces 1 text message per minute.

2 条评论

brudgers超过 7 年前
To me, the interesting part is the &quot;why?&quot; with an implied &quot;do you think the system won&#x27;t fall over?&quot; In the real world, the system design should provide capacity based on a statistical analysis of the independent events.<p>Fortunately, it is unlikely that all users will have three consecutive five minute conversations each starting at the same time. However, it is equally unlikely that the conversations will be evenly distributed. It is unlikely but less so that over time the worst case will be close to equally distributed because text conversations often spike around external events...the interesting answers to the question describe engineering judgments.<p>From the perspective of taking the question seriously, it is worth pointing out that it is slightly underspecified. Are conversations only between two parties or is group text possible?<p>Anyway, to me the question is interesting as a scheduling problem. The way I would search for an answer is by modeling it rather than intuition because scheduling problems are in NP.<p>Good luck.
mtmail超过 7 年前
Your math is correct. The 5 minute period doesn&#x27;t matter in the calculation.
评论 #15764839 未加载