Welcome! This project is a load management system built in Go, designed to limit the number of requests to a service within a specified time frame. ποΈ Initially developed for queue management in ticket sales, its flexible design makes it suitable for a variety of use cases where request rate control is crucial. π
-
βοΈ Efficient Request Management:
- Controls the maximum number of requests allowed within a specific time window.
- Prevents system overload and ensures smooth user experiences.
-
π¦ Redis-based State Management:
- Uses Redis for fast and reliable centralized state storage.
- Optimized for distributed systems and high-performance workloads.
-
π Horizontal Scalability:
- Designed for seamless scaling in modern architectures like Kubernetes.
- Supports multiple instances with consistent state sharing via Redis.
-
π οΈ Fault Tolerance:
- Built to gracefully handle partial failures without disrupting service.
-
π Versatility:
- Useful for a variety of scenarios, including:
- π‘οΈ Protecting against brute force attacks.
- π Controlling access to shared resources.
- β³ Managing high-demand queues, such as ticket sales.
- Useful for a variety of scenarios, including:
- π» Programming Language: Go (Golang).
- π Database: Redis, serving as the centralized store for state and counters.
- βΈοΈ Infrastructure Compatibility: Kubernetes and other container-based environments.
-
π Request Handling:
- Each request is identified using an IP address, token, or other unique identifier.
-
β³ Rate Limiting:
- Verifies how many requests have been made during the configured time frame.
- Denies excess requests with an HTTP
429: Too Many Requests
response.
-
π Distributed Synchronization:
- Ensures consistent state sharing across nodes using Redis.
-
π‘οΈ Resilience:
- Handles failures gracefully, including temporary Redis outages or node crashes.
-
ποΈ Queue Management:
- Prevents system saturation during high-demand events like ticket sales.
-
π‘οΈ Rate Limiting:
- Protects public and private APIs from abuse by controlling request rates.
-
π Shared Resource Management:
- Guarantees fair access to resources in distributed systems.
git clone https://github.com/by2waysprojects/queue-processor.git
cd queue-processor
- Install Redis locally or use a cloud-based solution like Redis Cloud. βοΈ
- Update the Redis connection string in the application configuration file.
go build -o queue-processor cmd/main.go
./queue-processor
Prefer containers? Build and run the Docker image! π³
docker build -t queue-processor -f build/Dockerfile
docker run -p 8080:8080 queue-processor
Use the provided Helm chart or manifest files to deploy on Kubernetes. βΈοΈ
We β€οΈ contributions! Please check out our Contribution Guidelines for how to submit issues, suggest improvements, or open pull requests.
This project is licensed under the Apache-2.0 License. See the LICENSE
file for more details.
For questions or support, feel free to reach out via issues. π¬