|
|
|
|
|
by Xeoncross
3150 days ago
|
|
rate-limiting -> nginx || iptables
Never ask PHP/Node/Ruby/Python to do low-level network routing. Your throwing megabytes of memory at a simple connection decision. If you need advanced logic for rate-limiting (not just access counting) then using nginx + memcached/redis as the marker. Have your app mark the ip in memcached/redis so nginx knows not to bother Node/PHP/Ruby/Python next time. |
|
"Never" doesn't make sense.