Home
Sign Up
Sign In
V2EX
›
问与答
请问微信通过网页授权获取 openid,在高并发情况下下,大家是如何处理 curl_exec 阻塞问题的?
king2014
·
Aug 17, 2018
· 2571 views
This topic created in 2940 days ago, the information mentioned may be changed or developed.
打个极端的比方,一下子一万人(都是第一次访问)进去到某个页面,所以他们会同时 curl 获取 openid,这时候出现 curl_exec 阻塞问题该如何解决?
openid
curl_exec
阻塞
curl
3 replies
•
2018-08-17 10:37:49 +08:00
1
king2014
OP
Aug 17, 2018
?
2
sujin190
Aug 17, 2018
当然是不要用 curl_exec 了
想高并发对外请求,只能非阻塞,那么 swoole 属于你
不过话说,其实微信那边也不能同时处理你一万并发,似乎超过一定限值会返回错误的,所以你还要考虑排队的事情
一般来说微信请求一次 openid 延时差不多 100ms,100 并发就可以每秒处理 1000,很快了
3
zhs227
Aug 17, 2018
不是应该排队吗..
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
5731 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 0c620bea · 292ms ·
UTC 03:14
·
PVG 11:14
·
LAX 20:14
·
JFK 23:14
♥ Do have faith in what you're doing.
❯