You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/03/31 15:15:52 UTC

[GitHub] [trafficserver] paladox opened a new issue #7664: How do you rate limit in trafficserver?

paladox opened a new issue #7664:
URL: https://github.com/apache/trafficserver/issues/7664


   I'm wondering is it possible to rate limit in trafficserver and if so how?
   
   In varnish you can use `vsthrottle`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] bryancall closed issue #7664: How do you rate limit in trafficserver?

Posted by GitBox <gi...@apache.org>.
bryancall closed issue #7664:
URL: https://github.com/apache/trafficserver/issues/7664


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] paladox commented on issue #7664: How do you rate limit in trafficserver?

Posted by GitBox <gi...@apache.org>.
paladox commented on issue #7664:
URL: https://github.com/apache/trafficserver/issues/7664#issuecomment-812107399


   > There is a plugin called "fq_pacing" which will rate limit individual TCP connections. Is this sufficient?
   
   Thanks! Not exactly. It doesn't appear you can white list specific ips from the rate limit or configure a rate limit per domain with it.
   
   For example we do:
   
   ```
   	# Allow higher limits for static.mh.o, we can handle more of those requests
   	if (req.http.Host == "static.miraheze.org" || req.http.Host == "static-new.miraheze.org") {
   		if (vsthrottle.is_denied("static:" + req.http.X-Real-IP, 500, 1s)) {
   			return (synth(429, "Varnish Rate Limit Exceeded"));
   		}
   	} else {
   		# Do not limit /w/load.php, /w/resources, /favicon.ico, etc
   		# T6283: remove rate limit for IABot (temporarily?)
   		if (
   			(req.url ~ "^/wiki" || req.url ~ "^/w/(api|index)\.php")
   			&& (req.http.X-Real-IP != "185.15.56.22" && req.http.User-Agent !~ "^IABot/2")
   		) {
   			if (req.url ~ "^/w/index\.php\?title=\S+\:MathShowImage&hash=[0-9a-z]+&mode=mathml") {
   				# The Math extension at Special:MathShowImage may cause lots of requests, which should not fail
   				if (vsthrottle.is_denied("math:" + req.http.X-Real-IP, 120, 10s)) {
   					return (synth(429, "Varnish Rate Limit Exceeded"));
   				}
   			} else {
   				# Fallback
   				if (vsthrottle.is_denied("mwrtl:" + req.http.X-Real-IP, 12, 2s)) {
   					return (synth(429, "Varnish Rate Limit Exceeded"));
   				}
   			}
   		}
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] bryancall commented on issue #7664: How do you rate limit in trafficserver?

Posted by GitBox <gi...@apache.org>.
bryancall commented on issue #7664:
URL: https://github.com/apache/trafficserver/issues/7664#issuecomment-1061291368


   @paladox We do have a rate limit plugin: https://docs.trafficserver.apache.org/admin-guide/plugins/rate_limit.en.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] traeak commented on issue #7664: How do you rate limit in trafficserver?

Posted by GitBox <gi...@apache.org>.
traeak commented on issue #7664:
URL: https://github.com/apache/trafficserver/issues/7664#issuecomment-811899958


   There is a plugin called "fq_pacing" which will rate limit individual TCP connections.  Is this sufficient?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] masaori335 commented on issue #7664: How do you rate limit in trafficserver?

Posted by GitBox <gi...@apache.org>.
masaori335 commented on issue #7664:
URL: https://github.com/apache/trafficserver/issues/7664#issuecomment-812241068


   On going #7623 (New rate_limit plugin for simple resource limitations ) is what you're looking for?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org