服务器如何控制带宽

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_32768743/article/details/84858698

最近业务上的需求,百度了好久,全是阿里云,腾讯云带宽啥的,什么都没有解决。上Google,发现了这篇文章:带宽救星:ngx_http_bandwidth_module 带宽控制模块
里面提到了ngx_http_bandwidth_module来做,Google搜索一番,根本没有这个模块。
继续Google,找到这篇文章 Dynamic Bandwidth Limits Using the NGINX Plus Key-Value Store好东西,就是我想要的,就是有点担心是不是要收费,果不其然

To try out the NGINX Plus key‑value store for yourself, start your free 30-day trial today or contact us to discuss your use case.

不过收获了一个新的词:Dynamic Bandwidth Limits

在百度上,还是找到了一篇文章:Nginx限制带宽配置示例
讲了三种方法,可以设置每个连接的速度限制,每个连接可以开多少个线程,还有每个域名的总带宽限制。开始我没注意到可以设置每个域名的总带宽限制,如果不同的服务设置不同的域名,那么是不是可以完成我的需求呢?

也搜到了这样一个模块 nginx_limit_speed_module,代码很久没更新了,看描述

This module makes it possible to limit the total speed of simultaneous
connections for the assigned session or as a special case, from one address.

猜你喜欢

转载自blog.csdn.net/qq_32768743/article/details/84858698