r/opnsense • u/future_lard • 11d ago
caddy plugin + big data transfer = meltdown
Hi
I have set up my opnsense with acme and caddy to get https for my internal services. works great except for when i use my forgejo docker registry. (docker clients dont like insecure registries, hence caddy)
When I pull an image through caddy it goes well for about the first GB, then it starts slowing down and at about 1.5GB it is down to single megabytes per second (hundreds of mb/s without caddy) before opnsense has a stroke and the ui and cli locks up for a minute or so (internet traffic still works)
Looking at top shows me that it is one caddy process maxing out one cpu core. there is plenty of free ram so that cant be the problem.
machine is a VM with 8 cpu cores running on a ryzen 7000 in proxmox and has been absolutely rock steady for the last 4 years.
perhaps u/Monviech has a suggestion?
thanks
4
u/1WeekNotice 11d ago
Feel free to ignore this comment as I don't have an answer to your question.
I recommend you let your firewall just be your firewall. With AI there is a lot of vulnerabilities being discovered and this includes reverse proxies. Nginx just had a recent one that is very serious (dubbed nginx2root if you want to look it up)
Not saying this will happen to caddy but you should reduce the risk.
1
u/PassionFar7190 11d ago
It doesn‘t exactly fits to your issue, but I‘ve observed a huge improvement in a similar setup after enabling TCP RACK.
This also affects other TCP connections terminated by the firewall iself, e.g. ha.
1
u/Monviech 11d ago
If its about performance you can create a profile and go upstream if you find something weird.
https://docs.opnsense.org/manual/how-tos/caddy.html#get-help-from-the-caddy-community
Like another comment said maybe try TCP RACK as well.