So I installed the other day on my small vps and during a load test I found out that it takes up more than 60% of the CPU during high load. I use(d) it to block annoying attempts to open random php admin pages (I don't even use PHP).

Figured out it's written in python and actually expected such a popular basic tool to be written in C for best performance...

So I started writing a mini clone in and it can handle 300,000 lines/sec on 1 cpu core in first tests.

Follow

To be clear I'm not sure actually python is the problem here just it is not really known for performance.

I used fail2ban with ufw as backend. Recently found out when calling ufw from rust that it's super slow and maybe that was actually the problem. Now using iptables and ipset as backend for my mini clone.

Maybe it was just a bad choice to use ufw and not fail2ban's fault but it's still fun to write a mini clone in rust so I'll continue on it.

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!