This repository contains an API Gateway implementation for managing Circuit Breaker and Time Limiter functionalities. The API Gateway acts as a central entry point for all requests, providing robust circuit-breaking capabilities and time limiting functionalities to enhance the resilience and stability of microservices.
The Users Microservice offers CRUD operations for managing user data. It allows creating, reading, updating, and deleting user records.
The Roles Microservice provides CRUD operations for managing role information. It enables the creation, retrieval, updating, and deletion of role records.
- Circuit Breaker: Protects the system from cascading failures by failing fast and providing fallback mechanisms when downstream services are unavailable or experiencing issues.
- Time Limiter: Ensures that requests are processed within predefined time limits, preventing long-running operations from affecting the overall system performance.
To use the API Gateway with Circuit Breaker and Time Limiter and run the microservices locally, follow these steps:
- Clone this repository to your local machine.
- Navigate to the root directory of the cloned repository.
- Install dependencies by running:
mvn clean install- Start the API Gateway and microservices by running:
mvn spring-boot:run- Access the API Gateway endpoints to interact with the microservices.
- Use the provided endpoints to perform CRUD operations on users and roles.
- Ensure that requests adhere to the defined time limits to prevent timeouts.
- Monitor the circuit breaker status and adjust configurations as needed for optimal performance.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License. Feel free to use, modify, and distribute this code for any purpose.