Table of Contents
❯ maximum of 2 request per second and regardless of the x-secret-key
❯ maximum of 10 request per minute and per x-secret-key
curl -X POST \
http://localhost:8080/ping \
-H 'content-type: application/json' \
-H 'x-secret-key: ahs98h' \
-d '{"request":"ping"}'
❯ go mod init github.com/fabmorais/throttling-test
❯ go mod tidy -v
❯ go run main.go
❯ docker build -t ping-pong-app:latest .
❯ kubectl apply -f kube/deployment.yaml
❯ kubectl apply -f kube/service.yaml
(not throttled):
❯ {"response":"pong"}
(throttled)
❯ {"message":"request throttled request","throttle_age":"10"}