koajs / ratelimit

Rate limiter middleware
MIT License
485 stars 57 forks source link

Help me understand this middleware #7

Closed thelinuxlich closed 9 years ago

thelinuxlich commented 10 years ago
app.use(ratelimit({
  db: redis.createClient(),
  duration: 60000,
  max: 100
}));

Does this mean that each ip can send 100 requests per minute and if it tries to send more, it is blocked for 1 minute?

dead-horse commented 9 years ago

yep

Globik commented 7 years ago

It it blocks how it looks like? Acctually how to use this middleware in practice?