Redian新闻
>
interview design question: how to design a high through put queue system
avatar
interview design question: how to design a high through put queue system# JobHunting - 待字闺中
x*y
1
assuming you are in a team that is developing queue system, how to design
this system to satisfy:
1. FIFO
2. Scalability. the request could be very large up to millions message per
second
3. Ordering: when input request has message 1 and message 2, client should
get the messages in same sequence.
what data structure you will use? how to satisfy such distributed high scale
problem?
avatar
u*n
2
好难

per
should
scale

【在 x**y 的大作中提到】
: assuming you are in a team that is developing queue system, how to design
: this system to satisfy:
: 1. FIFO
: 2. Scalability. the request could be very large up to millions message per
: second
: 3. Ordering: when input request has message 1 and message 2, client should
: get the messages in same sequence.
: what data structure you will use? how to satisfy such distributed high scale
: problem?
:

avatar
m*e
3
像kafka那样可以吗
avatar
D*0
4
没看懂。
avatar
r*s
5
这尼玛不就是design一个缩水版本的kafka吗
没有distributed systems的经验是很难的
consistency就够喝一壶的
得问问面试官自己会不会
avatar
x*4
6
这是kafka吧。能做出来,应该可以自己开店了。

per
should
scale

【在 x**y 的大作中提到】
: assuming you are in a team that is developing queue system, how to design
: this system to satisfy:
: 1. FIFO
: 2. Scalability. the request could be very large up to millions message per
: second
: 3. Ordering: when input request has message 1 and message 2, client should
: get the messages in same sequence.
: what data structure you will use? how to satisfy such distributed high scale
: problem?
:

avatar
x*y
7
可以打中文了,
不知道可不可以,如果像Kafka 那样, 怎么保证FIFO? 有经验的朋友来谈谈该怎么
处理这种问题?
比如即使不能做到所有的要求, 那在回答的时候该怎么回答(比如先保重1 & 2 )?

【在 m******e 的大作中提到】
: 像kafka那样可以吗
avatar
u*n
8
等了一个晚上,一个大牛简单来讲两句都没有,太让我失望了
我去一亩三分地了
avatar
r*s
9
严格的"FIFO"在多client下是不存在的,因为不存在准确的全球时钟
spanner目前是个怪胎,它的全球时钟实现暂时不考虑。
这里的FIFO只能认为是最简单情况,每个client的消息FIFO。(要保证clients之间的
causal order又会变得很复杂。。一般来说也没有这个需求吧。。)
所以结论基本就是client消息加编号咯。当且仅当0...n-1消息都收到时,才将n消息再
发给接收端。
WAL尽量保证故障恢复(因为要high throughput所以quorum不一定可以用)
最后如果因为种种原因真的卡了,那就真的卡了,选择timeout舍弃100%的FIFO还是选
择卡住等人来修,就是看requirement了。。。


: 可以打中文了,

: 不知道可不可以,如果像Kafka 那样, 怎么保证FIFO? 有经验的朋友来谈谈
该怎么

: 处理这种问题?

: 比如即使不能做到所有的要求, 那在回答的时候该怎么回答(比如先保重1

【在 x**y 的大作中提到】
: 可以打中文了,
: 不知道可不可以,如果像Kafka 那样, 怎么保证FIFO? 有经验的朋友来谈谈该怎么
: 处理这种问题?
: 比如即使不能做到所有的要求, 那在回答的时候该怎么回答(比如先保重1 & 2 )?

avatar
a*s
10
spanner就是用GPS 信号进行的同步,这样就有order了。看过paper的都知道这个吧。
avatar
r*s
11
不全是啊,还有机房里部署的atomic clock呢。。。两者互补才能保证全球时钟的稳定
性,因为它们failure无关
一般小厂现在哪能同时做到这两点,在机房里放几个劳力士也不管用啊。。
只能期待以后谷大爷赏口饭吃,把技术开放给更多的用户。。。


: spanner就是用GPS 信号进行的同步,这样就有order了。看过paper的都知道这
个吧。



【在 a*****s 的大作中提到】
: spanner就是用GPS 信号进行的同步,这样就有order了。看过paper的都知道这个吧。
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。