The 3 most popular Rate Limit Methods implemented in GO

  • Token Bucket Algorithm
  • Per-client rate limiting
  • Using tollbooth as middleware

To Run

  • cd into the project directory
  • run go run main.go
  • in another terminal, run

To call the API once -

curl -i http://localhost:8080/ping

To call the API multiple times -

for i in {1..6}; do curl http://localhost:8080/ping; done