Simple API that throttles requests over 166 per 10 second. Includes a script that uses exponential backoff to test making requests to the API
Customers hitting our rate limits don't always handle the 429 reponse in the best way possible. Here is an API which implements the same rate limits that we impose and against which the exponential backoff algorithm can be tested using the script included.
- Clone this repo to your machine
- Install dependencies with 'bundle install'.
- Update config/database.yml to use the adapter of choice
- If you are not using sqlite, you may need to create the database using 'rake db:create'
- Migrate the database using 'rake db:migrate'
- Run 'rails s' and navigate to localhost:3000/api/v1/articles to see list of articles returned
- Once the server is up and running run client/client_random.rb to see exponential backoff in action.