Skip to content

musialik/redis-rate-limiter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rate limiter demo

To run an example with 10 callers (you'll need a Redis server running on localhost:6379):

ruby run.rb 10

Try running twice with 5 callers each time. The limiter should keep all callers running, one call every second, as long as you keep the total number of callers smaller than the timeout (15 seconds).

To run the tests:

bundle exec rspec ./

About

A rate limiter based on Redis and written in Ruby

Resources

Stars

Watchers

Forks

Languages