@hackage / token-bucket

Rate limiter using lazy bucket algorithm

Latest0.1.0.1

About

Metadata

  • Last updated , by AndreasAbel
  • License GPL-3.0-only
  • Categories Concurrency
  • Maintained by: https://github.com/haskell-hvr/token-bucket

  • Lottery factor: 0

Links

Installation

Tested Compilers

  1. 9.4.4
  2. 9.2.5
  3. 9.0.2
  4. 8.10.7
  5. 8.8.4
  6. 8.6.5
  7. 8.4.4
  8. 8.2.2
  9. 8.0.2
  10. 7.10.3

Package Flags

Use the -f option with cabal commands to enable flags

    use-cbits (on by default)

    Use optimized getPOSIXTime implementation (faster by roughly one order of magnitude)

Readme

This package provides a variant of a Token Bucket or Leaky Bucket rate-limiting algorithm optimised for low overhead.

The rate-limiting variant implemented by this package is heavily inspired by the algorithm described in "Rate Limiting at Webscale: Lazy Leaky Buckets".