Welcome to the OpenGateway repo, an lightweight API Gateway written in Go for small to mid-sized projects. Leveraging Go's performance and simplicity, this gateway ensures quick response times and reliable performance without the complexity of larger systems. It is open-source, avoiding vendor lock-in and allowing complete control over deployment and customization through simple YAMl config.
You can easily extend its functionality with configurable plugins, and the setup is straightforward, with minimal configuration needed.
Please also see the architecture diagrams for an overview and better understanding of the architecture.
git clone git@github.com:lucdoe/opengateway.git
git clone https://github.com/lucdoe/opengateway.git
Make sure you have Docker with Docker Compose installed on your machine. Docker recommends Docker Desktop for Windows and Mac users.
cmd/gateway/config.yaml
file to your needsdocker compose up
cmd/gateway/config.yaml
file to your needsgo run cmd/gateway/main.go
We conducted a performance benchmark using hey
with the following parameters:
We have conducted load testing on our API Gateway using Locust (200 peaks, 50 ramps, 5m).
Type | Name | Requests | Fails | Median (ms) | Average (ms) | Min (ms) | Max (ms) | Average size (bytes) | Current RPS | Current Failures/s |
---|---|---|---|---|---|---|---|---|---|---|
GET | /some-endpoint | 15,532 | 0 | 4 | 4.93 | 1 | 76 | 1,280 | 66.8 | 0 |
The gateway performs well under the tested load, with no failures and consistent response times.
These results clearly show the API Gateway's performance under load, highlighting its ability to handle many requests efficiently.
The code of this repository is licensed under Apache v2.0. Read License tldr for a quick summary.