bifrost

module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2025 License: Apache-2.0

README

Bifrost GoDoc Build GoReport Security Coverage Status

A low latency and high throughput API Gateway library written in Go.

Reasons to use Bifrost

  1. Low latency and high throughput.
  2. Allows writing middlewares in native Go.
  3. Easy to integrate with existing Go services.
  4. Easy migration from Nginx. Leverage your Nginx experience.
  5. Built as an SDK/library instead of an artifact.

Feature highlights

  1. Support for writing middleware in Go.
  2. Low latency and high throughput (powered by the Hertz framework).
  3. Millisecond-level graceful reload for route updates without interrupting requests.
  4. Get gateway configurations from local files or configuration centers.
  5. Built-in Prometheus monitoring.
  6. Built-in OpenTelemetry tracing.
  7. Supports HTTP1.1/HTTP2/H2C/Webosocket/GRPC protocols.
  8. Multiple strategies for load balancing (round_robin, random, weighted, hashing)

Comparative Analysis

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
High concurrency and low latency
GRPC Load Balancer
Multiple strategies for load balancing (round_robin, random, weighted, hashing)
Background task support

Overview

flow

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

  1. Configuration
  2. Providers
  3. Routes
  4. Middlewares
  5. Directive

Credit

  1. CloudWeGo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL