Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.8k views
in Technique[技术] by (71.8m points)

如何测试出服务器单次可以向外发送多少条请求

准备了一台 Linux 服务器用来向微信发送小程序的订阅消息。因为单次需要发送上万条推送,每条推送都要等待返回结果。

请问下,如何测试出这台服务器单次能向外发送多少条请求?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

对微信的小程序发送消息应该都是CURL来做到的。
这样的程序即便是多线程也没有多大并发量,反而会因为线程上下文切换浪费了很多资源。
可以考虑采用pub/sub这种消费模式+异步IO。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...