<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div>Thanks, Guillaume and Dridi — I’m not seeing a way to limit <i class="">concurrent</i> requests however. We’re using vsthrottle to limit the total number of requests to a domain — i.e. “100 requests in 10 seconds; 600 requests in 5 minutes”; but that doesn’t guard against the case of someone’s PHP script blocking (say, external API request from some wordpress plugin), and when that happens, those PHP workers pile up pretty fast. Normally, requests to the backend at the rate of something like 100 per second in total would be reasonable, but in the case of bad backend PHP code in one domain, well; it’d resource starve workers for all the domains on that backend server (shared hosting).<div class=""><br class=""></div><div class="">Perhaps this is something that’s similar enough to what vsthrottle does that I should fork it and figure out how to implement it as a counter instead?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Jeff</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 30, 2017, at 4:22 AM, Guillaume Quintard <<a href="mailto:guillaume@varnish-software.com" class="">guillaume@varnish-software.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Jeff,<div class=""><br class=""></div><div class="">have a look at vmod_vsthrottle in varnish-modules, that should do it.</div></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class="">-- <br class=""></div>Guillaume Quintard<br class=""></div></div></div>
<br class=""><div class="gmail_quote">On Wed, Aug 30, 2017 at 9:24 AM, <span dir="ltr" class=""><<a href="mailto:jpotter-varnish@codepuppy.com" target="_blank" class="">jpotter-varnish@codepuppy.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="">
Hi,<br class="">
<br class="">
Is there a way to limit the number of concurrent requests sent to a backend based on the requested domain name? Or more broadly, based on some key/value?<br class="">
<br class="">
I know I can limit the number of requests to a backend with max requests, but our backend services multiple domains, and I’m wanting to limit the number of requests per domain (so that too many requests to one doesn’t cut off resources for others). I’ve thought of maybe doing this by defining multiple backends (pointed at the same server), but then I worry that the health checks we run would stack up (i.e. if there are a 100 domains, going from 1 backend to 100 backends would presumable increase the health checks 100 times).<br class="">
<br class="">
Thanks,<br class="">
Jeff<br class="">
<br class="">
______________________________<wbr class="">_________________<br class="">
varnish-misc mailing list<br class="">
<a href="mailto:varnish-misc@varnish-cache.org" class="">varnish-misc@varnish-cache.org</a><br class="">
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank" class="">https://www.varnish-cache.org/<wbr class="">lists/mailman/listinfo/<wbr class="">varnish-misc</a></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>