# README
Bifrost

A high-performance, low-latency API Gateway library developed in Golang.
Motivation
- The Lua ecosystem is relatively small, with many third-party packages still lacking features.
- Ideal for people who are more familiar with Go development than Lua.
- Integrating existing Go services with the gateway can reduce request latency.
- Easy to extend with custom features for secondary development.
- Designed for high performance and low latency.
Features
- Support for writing middleware in
Go
. - High performance and low latency (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
Roadmap
- Cluster management support.