A configurable HTTP API Gateway for applications running on Docker containers. Detailed architecture can be found in api_gateway_docker.pdf.
- Configurable routes and backends
- Graceful Shutdown
- Accurate traffic stats
- Chose Golang as programming language because of:
- Docker SDK
- Simple routing and middleware usage
- Reverse Proxy Utility
- Encapsulation is done at package level to avoid mutations
- For multiple backends, any container is randomly chosen at runtime (instead of load time)
- HTTP Method isn't taken into consideration for routing
- Mutex is used to avoid race conditions when measuring stats
- HTTP Connections to backend aren't pooled/reused
- No health-check is performed when choosing a backend
make install
rgate --port 8080 --config config.yml
make test
make lint