Skip to content

thiagosena/rate-limit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rate limit pattern with spring boot

In this project, I would like to demo Rate Limit pattern, one of the microservice design patterns for designing highly resilient Microservices using a library called bucket4j along with Spring Boot.

🚀 How to execute

mvn spring-boot:run

✨ How to use

  • get all by user:
# Without auth
curl --location --request GET 'http://localhost:8080/messages'

# With basic authentication
curl --location --request GET 'http://localhost:8080/messages' \
--header 'Authorization: Basic am9hbzoxMjM0NTY='
  • post create message
  curl --location --request POST 'http://localhost:8080/messages' \
  --header 'Authorization: Basic am9hbzoxMjM0NTY=' \
  --header 'Content-Type: application/json' \
  --data-raw '{ "content": "Test Message 123" }'

Releases

No releases published

Packages

No packages published

Languages