apache 下载 速度_使用Apache限制下载速度

apache 下载 速度

My adventures into retro gaming have brought me back into the semi-seedy world of piracy websites and the technology considerations that dictate their business model.  Annoying popups and pornographic advertisements aside, the most obvious technological observation I made was that each of these sites used bandwidth throttling as a way to make money.  Want that game to download quickly?  Stump up $10 per month and it will be lightning fast; otherwise you're relegated to sleep-inducing download speeds.

我对复古游戏的冒险使我重新回到了盗版网站的半种子世界,并决定了其商业模式的技术考虑。 除了烦人的弹出窗口和色情广告,我所做的最明显的技术观察是,这些站点中的每个站点都使用带宽限制作为一种赚钱的方式。 想要该游戏快速下载吗? 每月加收10美元,很快就可以实现; 否则,您将被降级为导致睡眠的下载速度。

In researching download speed limits, it became apparent that dynamic rate limitation is incredibly inefficient, and that the best way to throttle downloads is by configuring different servers or virtual directories with different download speeds, and directing each user to each server based on the download speed they should have.

在研究下载速度限制时,很明显,动态速率限制效率非常低,并且限制下载的最佳方法是通过配置具有不同下载速度的不同服务器或虚拟目录,并根据下载速度将每个用户定向到每个服务器他们应该有。

配置Apache的下载速度限制 (Configuring Apache's Download Speed Limit)

To throttle the download speed on Apache servers, enable the mod_ratelimit extension:

要限制Apache服务器上的下载速度,请启用mod_ratelimit扩展名:


<!-- Requires 2.4+ -->
LoadModule ratelimit_module modules/mod_ratelimit.so


Then set different download speeds by directory with the following Apache configuration:

然后使用以下Apache配置按目录设置不同的下载速度:


<IfModule mod_ratelimit.c>
    <!-- 100kb/second limit -->
    <Location /tier1>
        SetOutputFilter RATE_LIMIT
        SetEnv rate-limit 100
    </Location>

    <!-- 500kb/second limit -->
    <Location /tier2>
        SetOutputFilter RATE_LIMIT
        SetEnv rate-limit 500
    </Location>
</IfModule>


Some type of dynamic Apache config would allow custom URLs per user which would obscure download speed URLs so users couldn't dynamically spoof URLs to get some else's download speed.

某些类型的动态Apache配置会允许每个用户使用自定义URL,这会掩盖下载速度URL,因此用户无法动态地欺骗URL以获取其他下载速度。

The download speed limit and throttling business seems booming: just look at MEGA and other likewise services.  The science behind download throttling is big business and I hope to learn more about it.  In the mean time, it's nice to know that download speed limitation can be done with a few Apache directives!

下载速度限制和节流业务似乎正在蓬勃发展:仅查看MEGA和其他类似服务。 下载节流背后的科学是一项艰巨的任务,我希望了解更多信息。 同时,很高兴知道可以使用一些Apache指令来完成下载速度限制!

翻译自: https://davidwalsh.name/limit-download-speed

apache 下载 速度

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值