Bifrost

A low latency and high throughput API Gateway library written in Go.
Goal
- Low latency and high throughput.
- Allows writing middlewares in native
Go
.
- Easy to integrate with existing Go services.
- Built as an SDK/library instead of an artifact.
Features
- Support for writing middleware in
Go
.
- Low latency and high throughput (powered by the Hertz framework).
- Millisecond-level hot reloads for route updates without interrupting requests.
- Built-in Prometheus monitoring.
- Built-in OpenTelemetry tracing.
- Supports
HTTP1.1
/HTTP2
/H2C
/Webosocket
/GRPC
protocols.
Comparative Analysis
|
Bifrost |
Nginx |
SDK mode support for custom your gateway |
✅ |
❌ |
Middleware support |
✅ |
❌ |
Middleware written in Go |
✅ |
❌ |
Rich middleware ecosystem |
✅ |
❌ |
Millisecond-level hot reloads for route 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 |
✅ |
❌ |
HTTP2 upstream support |
✅ |
❌ |
High concurrency and low latency |
✅ |
✅ |
GRPC Load Balancer |
✅ |
✅ |
Sticky session |
✅ |
✅ |
Background task support |
✅ |
✅ |
Overview

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
Get Started
Set up a high-performance API gateway in 5 minutes
Documents
- Configuration
- Routes
- Middlewares
Roadmap
- Cluster management support.
Credit
- CloudWeGo