My software has to interact via HTTP requests with several third party services, and these service enforce a rate limiter policy on their side. If I go above the rate limit, my server which is running my software might get banned by IP.
Is there a way to implement an outbound rate limiter outside of my software stack with common networking tools (like iptables and the likes)? Ideally, this rate limiter would have a buffer, so that if I exceed the outbound rate limit for a given IP, the connection will simply be delayed instead of dropped.
This would release me from the burden of adding this complexity to the code that is supposed to handle only my business logic. Also, I'm really curious about this! :)