A low-latency and high-throughput API gateway library in Go
- Low latency and high throughput.
- Allows writing middlewares in native
Go. - Easy to integrate with existing Go services.
- Easy migration from Nginx. Leverage your Nginx experience.
- Built as an SDK/library instead of an artifact.
- Support for writing middleware in
Go. - Low latency and high throughput (powered by the Hertz framework).
- Millisecond-level graceful reload for route updates without interrupting requests.
- Get gateway configurations from local files or configuration centers.
- Built-in Prometheus monitoring.
- Built-in OpenTelemetry tracing.
- Supports
HTTP1.1/HTTP2/H2C/Webosocket/GRPCprotocols. - Multiple built-in balancer algorithm (
round_robin,random,weighted,chash) and allow to build your own
| Bifrost | Nginx | |
|---|---|---|
| SDK for building your own gateway | ✅ | ❌ |
Write your middlewares in native Go (not TinyGo) |
✅ | ❌ |
| Rich built-in middlewares | ✅ | ❌ |
Millisecond-level graceful reloads for dynamic configuration updates |
✅ | ❌ |
| Blue-green deployment for services | ✅ | ❌ |
| High connection pool reuse rate | ✅ | ❌ |
| Easy integration with existing Go programs | ✅ | ❌ |
Built-in Prometheus monitoring |
✅ | ❌ |
Built-in OpenTelemetry tracing |
✅ | ❌ |
Native k8s service discovery |
✅ | ❌ |
| Built-in web application firewall and support OWASP Core Rule Set | ✅ | ❌ |
| HTTP2 upstream support | ✅ | ❌ |
| Multiple configuration providers | ✅ | ❌ |
| Standardized and User-Friendly Configuration | ✅ | ❌ |
| Multiple built-in balancer algorithm and allow to build your own | ✅ | ❌ |
| High concurrency and low latency | ✅ | ✅ |
| GRPC Load Balancer | ✅ | ✅ |
| Background task support | ✅ | ✅ |
servers: Server configuration, supports middlewares, controlling which port to expose
routes: Route configuration, controls request path forwarding rules to specific services
services: Service configuration, controls service details such as protocol information
upstreams: Upstream configuration, manages load balancing rules for backend hosts
