<p>我收到了来自<a href="https://github.com/andrewgodwin" rel="nofollow noreferrer">Andrew Godwin</a>的<a href="https://groups.google.com/forum/#!topic/django-users/OS7y3CMv3Xg" rel="nofollow noreferrer">answer</a>。他不使用StackOverflow,所以我代表他把它贴在这里。在</p>
<blockquote>
<p>Hi Jamie,</p>
<p>At the moment Channels has quite limited support for throttling - it pretty much consists of an adjustable channel size for incoming connections which, when full, will cause the server to return a 503 error. Workers are load-balanced based on availability due to the channels design, so there's no risk of a worker gaining a larger queue than others.</p>
<p>Providing more advanced DoS or DDoS protection is probably not something we can do within the scope of Channels itself, but I'd like to make sure we provide the appropriate hooks. Were there particular things you think we could implement that would help you write some of the things you need?</p>
<p>(It's also worth bearing in mind that right now we're changing the worker/consumer layout substantially as part of a major rewrite, which is going to mean different considerations when scaling, so I don't want to give too precise advice just yet)</p>
<p>Andrew</p>
</blockquote>
<p>他还在他的<a href="https://www.aeracode.org/2017/7/11/towards-channels-20/" rel="nofollow noreferrer">blog</a>中写了关于2.0迁移的文章。在</p>