bilive / bilive_client

基于Node.JS的bilibili账号活跃系统
MIT License
457 stars 109 forks source link

请问您是怎么解决高并发下的403问题的 #88

Closed yjqiang closed 6 years ago

yjqiang commented 6 years ago

如题

lovezm commented 6 years ago

我记得l大说了好像是那些代理ip还是cdn啥的

lzghzr commented 6 years ago

43

yjqiang commented 6 years ago

@lzghzr 加入了cdn之后,对于密集抽奖请求时仍然会有403(有效cdn在47左右),我看到 https://github.com/lzghzr/bilive_client/pull/43/commits/7c958bc1f6d4ac3fbc8e6a4740ae10abd635b705, 这里的措施没太看懂,因为抽奖请求是同时向所有用户广播的,那么怎么保证尽量让用户不要凑在一起、密集时间段抽奖呢?

lzghzr commented 6 years ago

47个有效CDN还会限制的话,你是挂了多少账号啊😱 这个量挂400个账号没问题吧,除外B站现在有了新的限制

yjqiang commented 6 years ago

但是有一个问题在于,请求之间比如1号小电视抽奖与2号小电视的房间进入操作可能存在重复行为,类似的事情会导致行为叠加,所以可能400用户存在几乎同时的800请求量,mmp,403了就

lzghzr commented 6 years ago

可以无脑加IP,昨天重新扫了一遍,大概有80多个 这样要解决的就是性能问题了,上千个请求就这么发出去多半会死一片

On Thu, Jul 12, 2018, 23:24 yjqiang notifications@github.com wrote:

但是有一个问题在于,请求之间比如1号小电视抽奖与2号小电视的房间进入操作可能存在重复行为,类似的事情会导致行为叠加,所以可能400用户存在几乎同时的800请求量,mmp,403了就

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/lzghzr/bilive_client/issues/88#issuecomment-404550891, or mute the thread https://github.com/notifications/unsubscribe-auth/AMxV0k72VbJi9so9UN2vC09nv8r2mhs1ks5uF2oegaJpZM4VJ3QM .