Redian新闻
>
请教一个建网站的笔试题
avatar
请教一个建网站的笔试题# Java - 爪哇娇娃
l*b
1
我申请的是java职位, 一个建网站的题问假设知道数据库平均处理的信用卡
transaction是40个每秒, 请问如何估计同时在线打开信用卡支付网页的人数? 大概
要从哪些因素考虑? 有没有计算方程式? 谢谢各位。
avatar
g*e
2
主要石每个transaction的时间长度吧?如果每个transaction只有1/40秒,那么同时在
线的只有1
人。

【在 l*****b 的大作中提到】
: 我申请的是java职位, 一个建网站的题问假设知道数据库平均处理的信用卡
: transaction是40个每秒, 请问如何估计同时在线打开信用卡支付网页的人数? 大概
: 要从哪些因素考虑? 有没有计算方程式? 谢谢各位。

avatar
g*g
3
If you want to know how many people are opening that page, why
don't you just setup a counter? Before session expires and another
page requests, that's the accurate number you are looking for.
I don't quite understand when you can get accurate number with
some simple counter why you need that kind of estimation.

【在 l*****b 的大作中提到】
: 我申请的是java职位, 一个建网站的题问假设知道数据库平均处理的信用卡
: transaction是40个每秒, 请问如何估计同时在线打开信用卡支付网页的人数? 大概
: 要从哪些因素考虑? 有没有计算方程式? 谢谢各位。

avatar
k*u
4
If I understand your question correctly, you are asking the throughput of
the whole application, assuming DB layer is the bottle neck and its
throughput is 40 transactions/second.
This depends directly on how often a user session triggers a DB transaction.
Some simple examples, if a user session triggers a DB transaction every
second, you can have only 40 simultaneous user sessions; if a user session
triggers a DB transaction every 10 seconds, you can have 400 simultaneous
user sessions; and so
avatar
m*t
5
This makes sense. I was thinking along some similar lines, e.g., estimate
how long does it typically take a user to input the credit card info and hit
the button. (It's of course much longer for me personally because I always
have trouble locating my wallet...)

transaction.

【在 k****u 的大作中提到】
: If I understand your question correctly, you are asking the throughput of
: the whole application, assuming DB layer is the bottle neck and its
: throughput is 40 transactions/second.
: This depends directly on how often a user session triggers a DB transaction.
: Some simple examples, if a user session triggers a DB transaction every
: second, you can have only 40 simultaneous user sessions; if a user session
: triggers a DB transaction every 10 seconds, you can have 400 simultaneous
: user sessions; and so

avatar
l*b
6
Thanks for all your helps. I tried the following assumption. I assume the
average time user stay and fill in the payment form is between 3-5 mins. The
assumption is the system could handle about 12,000 (40X5X60) simultaneous
online users at the peak time. Does it make sense? Thanks.
avatar
q*u
7
有意思的题目,
Speed = Amount / Time
Amount = Speed * Time = 40 (Transaction/Sec) * 300 (Sec) = 12, 000(
Transactions)
思路真重要,一看答案恍然大悟,但是一下子答不上来,给已经知道答案的
interviewer,岂不是被bs

Thanks for all your helps. I tried the following assumption. I assume the
average time user stay and fill in the payment form is between 3-5 mins. The
assumption is the system could handle about 12,000 (40X5X60) simultaneous
online users at the peak time. Does it make sense? Thanks.

【在 l*****b 的大作中提到】
: Thanks for all your helps. I tried the following assumption. I assume the
: average time user stay and fill in the payment form is between 3-5 mins. The
: assumption is the system could handle about 12,000 (40X5X60) simultaneous
: online users at the peak time. Does it make sense? Thanks.

avatar
h*0
8
这个关键是要有能力想到“每个人处理时间约为3到5分钟”

The

【在 q*********u 的大作中提到】
: 有意思的题目,
: Speed = Amount / Time
: Amount = Speed * Time = 40 (Transaction/Sec) * 300 (Sec) = 12, 000(
: Transactions)
: 思路真重要,一看答案恍然大悟,但是一下子答不上来,给已经知道答案的
: interviewer,岂不是被bs
:
: Thanks for all your helps. I tried the following assumption. I assume the
: average time user stay and fill in the payment form is between 3-5 mins. The
: assumption is the system could handle about 12,000 (40X5X60) simultaneous

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。