Slow Web - An HTTP Request Governor
Slow Web is a way to limit the number of requests to a domain within a certain period of time.
For example, the GitHub API only allows for 60 requests per minute. Slow Web can monitor the number of calls to that domain and will sleep on the next request that is over the limit.
Slow Web follows the rules of Semantic Versioning.
To install Slow Web, simply install the gem:
$ [sudo] gem install slowweb
And specify the domain to limit.
require 'slowweb' .('github.com', 10, 60)
This restricts the
github.com domain to only allowing
10 requests every
60 seconds (or one minute).
If you'd like to contribute to SlowWeb, start by forking the repository on GitHub:
Then follow these steps to send your changes:
- Clone down your fork
- Create a topic branch to contain your change
- All code must have MiniTest::Unit test coverage.
- If you are adding new functionality, document it in the README
- If necessary, rebase your commits into logical chunks, without errors
- Push the branch up to GitHub
- Send me a pull request for your branch