Hello!
2016-07-26 1:43 GMT-07:00 <soa...@gmail.com>:
> 现在有这样一个需求,前段访问我们的openresty服务器,我会在后台发起多个新的Http请求,但是在请求之前我得判断这些http请求是否达到了最大的QPS的值(每秒都要统计,每次请求都要验证),如果已经达到则不发请求到这个Http链接
> 后端用的是ngx.thread.spawn来并行的执行请求。请问大家有什么好的方法么
>
感觉你这里可以直接使用 lua-resty-limit-traffic 库?
https://github.com/openresty/lua-resty-limit-traffic/
Regards,
-agentzh