Number of requests per second

1. My Caddy version (caddy -version):

2922d09bef3c504dde66bc12f7441668fcef6a20

2. How I run Caddy:

I run caddy as a docker instance with some plugins on top to proxy web sites.

a. System environment:

It uses docker FROM alpine:3.7

How many requests the Caddy proxy can handle per second? If I notice large number of requests from some specific IP (may be intruder), what is the best way to block those IPs? Is there any programmatic way to block them based on their request count per second?

Looking forward to hearing from you soon.

Thanks,
Mahfuz

1 Like

Hi @masumbuet!

Looks like commit 2922d09bef3c504dde66bc12f7441668fcef6a20 is Caddy v0.10.14. You might want to update to v1.0.4.

As for how many requests per second the Caddy proxy can handle… Depends! Network and processor are important factors, as is the backend Caddy needs to proxy the request to.

You could test your setup with something like h2load to get a concrete idea of your server’s capabilities.

Rate limiting is possible with the ratelimit plugin.

https://caddyserver.com/v1/docs/http.ratelimit

Hi,
We don’t want to stress our proxy with CONNECT requests. Currently, we are responding with 405 if it’s a CONNECT request in our topmost plugin. But we still see that our proxy fails to respond to valid GET requests if there are plenty of CONNECT requests coming to our proxy. What is the best way to reject or drop these CONNECT requests except from dropping through iptables RULE?

It looks like ratelimit can handle limits per method. Specify CONNECT as the method.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.