This is simple skinny rails app in (json api only mode) to show how to rate limit requests and test em with rspec.
Time between reviews ~10 days.
Done with rack-attack
Result: ** ASKED NOT TO USE GEMS **
Dead simple middleware. Result: pending
- Return
OK
- 100 requests per hour / could be changed
- This is implementations using Redis and is suitable for clustered app.
- Make sure that you never use rate limit for API using ruby. Go safer way with proper API Gateway solitions.
- Ruby
>= 2.2.2minimum requirement comes from rails 5.1 - Redis
>= 2.0
or
- docker
User .env or .env.local to configure connection to redis
This app comes pre-configured but you can change rule in rate-limit.yml
for development bundle install and rails server
or
docker-compose up - will run in production mode
do bundle exec rspec
If you Redis is not up and running the app will ignore that while friendly giving blody r

Air-Attack is freely distributable under the terms of an MIT-style licence.
Copyright notice and permission notice shall be included in all copies or substantial portions of the Software.
