Skip to content

prashantpiyush1111/spring-boot-production-patterns

Repository files navigation

🚀 Spring Boot Production Patterns

Real-world Spring Boot patterns with working code & Docker setup.

Java Spring Boot Patterns License Contributions Welcome CI - Build All Patterns


🎯 What is this?

Most tutorials show you how to build a Spring Boot app. This repo shows you what to do when it breaks in production.

Every pattern includes:

  • ✅ Working Spring Boot code
  • ✅ Docker Compose setup
  • ✅ When to use & when NOT to use

📦 Patterns

# Pattern Description Status
01 Circuit Breaker Stop cascading failures when a service goes down ✅ Done
02 Rate Limiting Control how many requests a client can make ✅ Done
03 Retry Logic Automatically retry failed operations with backoff ✅ Done
04 Idempotency Prevent duplicate processing of the same request ✅ Done
05 Caching Reduce DB load by serving repeated requests from cache ✅ Done
06 Bulkhead Isolate failures using separate thread pools per service ✅ Done
07 Health Check Monitor service health via actuator endpoints ✅ Done
08 Throttling Control concurrent requests per user with Semaphore ✅ Done
09 Graceful Shutdown Complete in-flight requests before shutting down ✅ Done
10 Dead Letter Queue Preserve failed messages for retry and investigation ✅ Done

🚀 Getting Started

Each pattern is standalone. Just go to any folder and run:

cd <pattern-folder>/<project-folder>
./mvnw spring-boot:run

Or with Docker:

cd <pattern-folder>
docker-compose up

🤝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md first.


👨‍💻 Author

Prashant Maurya


📄 License

MIT License — free to use, modify, and distribute.

About

Real-world Spring Boot patterns with working code, diagrams & Docker setup

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages