A high-performance, feature-rich reverse proxy server built with Kotlin and Ktor. This reverse proxy acts as an intermediary for client requests, forwarding them to backend servers while providing load balancing, circuit breaking, security features, and more.
| Feature | Description |
|---|---|
| Load Balancing | Distribute requests among multiple backend servers using various strategies |
| Circuit Breaking | Prevent cascading failures by detecting backend issues and providing fallback responses |
| WebSocket Support | Forward WebSocket connections to backend servers with bidirectional communication |
| SSE Support | Forward Server-Sent Events (SSE) from backend servers to clients |
| Security | SSL/TLS termination, IP filtering, rate limiting, and request validation |
| Logging | Comprehensive structured logging with SLF4J and Logback |
| Monitoring | Metrics collection with Prometheus and visualization with Grafana |
| Docker Support | Easy deployment with Docker and Docker Compose |
- JDK 17 or higher
- Gradle 7.6 or higher
-
Clone the repository:
git clone https://github.com/yourusername/reverse-proxy.git cd reverse-proxy -
Run the server:
./gradlew run
-
The server will start on port 8080 by default. You can access it at http://localhost:8080.
-
Build and run with Docker Compose:
docker-compose up --build
-
The server will be available at http://localhost:8080.
For detailed documentation, please refer to the following:
- User Guide - Installation, configuration, and usage
- Architecture - System architecture and design
- Components - Detailed component documentation
- Configuration - Configuration options and examples
- Deployment - Deployment options and instructions
- Monitoring - Monitoring setup and dashboards
- Development - Development guide and extending the application
- Testing - Testing approach and running tests
| Task | Description |
|---|---|
./gradlew test |
Run the tests |
./gradlew build |
Build everything |
buildFatJar |
Build an executable JAR of the server with all dependencies included |
buildImage |
Build the docker image to use with the fat JAR |
publishImageToLocalRegistry |
Publish the docker image locally |
run |
Run the server |
runDocker |
Run using the local docker image |
This project is licensed under the MIT License - see the LICENSE file for details.
- Ktor - The web framework used
- Resilience4j - For circuit breaking functionality
- Prometheus - For metrics collection
- Grafana - For metrics visualization