Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 830 Bytes

README.md

File metadata and controls

27 lines (22 loc) · 830 Bytes

rate-limiter-svc

This is a simple POC of a rate-limiting microservice using redis. The full design can be found here: Distributed Rate Limiter Design Doc

Running Locally

This POC was built to be run locally in a docker container. A docker-compose file is included that will bring up both the rate-limiter-svc container and a redis container.

Requirements

  • docker-compose
  • Port 8080 available

Steps:

Starting the service:

docker-compose up -d

Viewing the logs:

docker-compose logs rate-limiter-svc

Testing the service:

for i in {1..30}; do curl -X POST http://localhost:8080/request/ip -H 'Content-Type: application/json' -d '{"key": "foo"}'; done