Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

重新压测了一下 #24

Closed
XiaoMiku01 opened this issue Mar 10, 2023 · 23 comments
Closed

重新压测了一下 #24

XiaoMiku01 opened this issue Mar 10, 2023 · 23 comments

Comments

@XiaoMiku01
Copy link
Contributor

上海腾讯云 4C8G 10M 同时连接5.8w个直播中的房间,内存占用 4.5G 左右
image
image
之后出现连接不稳定情况,可能是一台服务器的上限了

@FishZe
Copy link
Owner

FishZe commented Mar 10, 2023

看一下带宽,和连接数上限的问题
家宽这边只有1k+可以连接,应该是有路由器/网卡/运营商的连接数上线

@XiaoMiku01
Copy link
Contributor Author

可能是端口不够用了

@FishZe
Copy link
Owner

FishZe commented Mar 10, 2023

那,是否需要添加一个自定义代理功能呢?

@XiaoMiku01
Copy link
Contributor Author

ws不封ip,没必要加代理

@FishZe
Copy link
Owner

FishZe commented Mar 10, 2023

用另外两台服务器做小跳板,大概可以解决端口不够用的问题吧?

@XiaoMiku01
Copy link
Contributor Author

分布式的话,可能要重新设计了。锁不好写了。。。

@XiaoMiku01
Copy link
Contributor Author

用代理服务器。主服务器也要开端口啊,不会减少端口使用啊

@FishZe
Copy link
Owner

FishZe commented Mar 10, 2023

但是真的有那么大的连接需求嘛,几万个直播间记录数据,对数据库和磁盘IO的压力都太大了吧
另外某些b站的非官方观测站好像都只记录正在直播的弹幕

@FishZe
Copy link
Owner

FishZe commented Mar 10, 2023

用代理服务器。主服务器也要开端口啊,不会减少端口使用啊

哦对,忘记了

@XiaoMiku01
Copy link
Contributor Author

所以只能主服务器开监听端口,让副服务器发包过来

@XiaoMiku01
Copy link
Contributor Author

但是真的有那么大的连接需求嘛,几万个直播间记录数据,对数据库和磁盘IO的压力都太大了吧 另外某些b站的非官方观测站好像都只记录正在直播的弹幕

这5.8w我就是爬的B站真在直播的房间列表

@FishZe
Copy link
Owner

FishZe commented Mar 10, 2023

所以只能主服务器开监听端口,让副服务器发包过来

是的

@FishZe
Copy link
Owner

FishZe commented Mar 10, 2023

但是真的有那么大的连接需求嘛,几万个直播间记录数据,对数据库和磁盘IO的压力都太大了吧 另外某些b站的非官方观测站好像都只记录正在直播的弹幕

这5.8w我就是爬的B站真在直播的房间列表

b站有那么多的直播!?!?

@XiaoMiku01
Copy link
Contributor Author

不知道,反正我用的app上那个列表接口

@FishZe
Copy link
Owner

FishZe commented Mar 10, 2023

如果想做观测站的话,至少需要两台服务器做监听,另外数据库也需要单独部署,腾讯云限制IO多半是不够的

@XiaoMiku01
Copy link
Contributor Author

工作量有点大,分布式要上消息队列的。之后再说吧

@FishZe
Copy link
Owner

FishZe commented Mar 10, 2023

还有什么需要修改的嘛。没有修改的我就完善下文档发tag了?

@XiaoMiku01
Copy link
Contributor Author

嗯嗯

@FishZe
Copy link
Owner

FishZe commented May 15, 2023

可以问下获取所有正在直播的直播间号用的是哪个接口吗?

@XiaoMiku01
Copy link
Contributor Author

就是app端那个直播列表接口,按时间一直轮询,不过会风控,我用了七台机子当代理池才没被风控

@FishZe
Copy link
Owner

FishZe commented May 15, 2023

api.live.bilibili.com/xlive/app-interface/v2/second/getList

是这个接口吗?

@XiaoMiku01
Copy link
Contributor Author

嗯啊

@FishZe
Copy link
Owner

FishZe commented May 15, 2023

好的好的谢谢🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants