bfe is a free, open source networking & connectivity project written in Go and released under Apache-2.0. It has 6,264 GitHub stars, 950 forks and 34 open issues, and was last pushed 7 hours ago. On this registry it ranks #23 of 31 tracked projects in Networking & Connectivity, with 5 head-to-head comparisons available.

What is bfe?

BFE (Beyond Front End) is an open-source, Apache-2.0 licensed layer 7 load balancer written in Go, originally built at Baidu and now a Cloud Native Computing Foundation (CNCF) sandbox project, intended for platform, infrastructure, and networking engineers who need content-based routing and centralized traffic management in front of backend services.

What it is

BFE is the open-source project name for both a forwarding engine and the management tooling built around it. The system is split into a data plane and a control plane. The data plane is the BFE Server in this repository, which performs content-based routing, load balancing, and forwarding of user traffic to backend servers. The control plane consists of three companion components: API-Server, which provides an API and handles the update, storage, and generation of BFE configuration; Conf-Agent, which loads configuration, fetches the latest config from API-Server, and triggers BFE Server to reload it; and Dashboard, which provides a graphical interface for managing and viewing the major configuration of BFE. The project also includes BFE Ingress Controller, built on BFE, so that Ingress in Kubernetes can be fulfilled by BFE rather than by a separate ingress data plane.

The concrete problem it addresses is the gap between plain forwarding and managed traffic control. A conventional layer 7 proxy balances requests and stops there; routing rules, configuration distribution, and reload behaviour are left to whoever runs it. BFE couples the forward engine with a routing rule language, a RESTful configuration API, and an agent that pushes configuration changes into the running server, so that routing policy lives in a managed store rather than in hand-edited files. It lives in the Go and cloud-native ecosystem, with a Kubernetes deployment path and an official Snap package alongside container images.

Key capabilities

  • Multiple protocols supported, including HTTP, HTTPS, SPDY, HTTP2, WebSocket, TLS, and FastCGI.
  • Content-based routing with user-defined routing rules expressed in an advanced domain-specific language.
  • Support for multiple load balancing policies.
  • A flexible plugin framework for extending functionality, exposed through the bfe_module Go package documented on GoDoc.
  • Centralized management through a RESTful API and the Dashboard interface.
  • Detailed built-in metrics for observing the forwarding layer.
  • Container image builds via make docker, which produces both production and debug images with tags derived from the VERSION file, overridable with BFE_IMAGE_NAME, plus make docker-push for publishing.

Who uses it and how

  • Kubernetes operators who deploy the Ingress Controller to serve Ingress traffic, using the provided kustomization under examples/kubernetes and the accompanying whoami-deploy.yaml sample workload.
  • Platform teams that want configuration owned by an API rather than by the edge nodes: API-Server stores and generates config, Conf-Agent fetches it and triggers BFE Server reloads, and Dashboard gives a graphical view of the major settings.
  • Engineering teams that need to add behaviour not covered by the core, by writing modules against the plugin framework instead of forking the forward engine.
  • Operators who package and ship the load balancer through the Snap store or through private container registries reachable by their cluster nodes.
  • Teams standardising on a CNCF sandbox project for the traffic entry point, with the governance and licence that implies.

Getting started

Build the images from the repository root with make docker (setting BFE_IMAGE_NAME if a custom registry path is wanted, and make docker-push to publish), then deploy the Kubernetes example with kubectl apply -k . inside examples/kubernetes, followed by kubectl apply -f whoami-deploy.yaml. Installation details, including image mirror settings, initialization, and cleanup, are in docs/en_us/installation/install_using_docker.md and examples/kubernetes/README.md.

How it compares

No list of paid or commercial products that BFE replaces is provided in the available facts, and no comparable tools are named either. It therefore stands alone in this registry, described only on its own terms as a Go-based layer 7 load balancer and traffic management system with a separate control plane.

When to use it — and when not to

A self-hoster takes on more than a single binary: the full system implies running BFE Server together with API-Server, Conf-Agent, and Dashboard, and the documented quick start assumes Docker image builds plus a Kubernetes cluster whose nodes can pull the resulting image. Teams that want no configuration-management plane, or that have no cluster and no willingness to operate one of these components, should look at simpler forwarders instead. The repository is actively maintained and Apache-2.0 licensed, but the quick-start path is oriented toward container and Kubernetes deployment rather than a one-command local install, and the Kubernetes example documentation itself flags finalizer troubleshooting as a real operational detail.

project readme (upstream, from github) — read inline

BFE

GitHub Travis Go Report Card GoDoc Snap Status CII Best Practices FOSSA Status Slack Widget

English | 中文

BFE (Beyond Front End) is a modern layer 7 load balancer from baidu.

BFE is a Cloud Native Computing Foundation (CNCF) sandbox project.

cncf-logo

Introduction

BFE opensource project includes several components, which can be used together as a integrated layer 7 load balancer and traffic management solution.

BFE system consists of data plane and control plane:

  • Data plane:responsible for forwarding user's traffic, including below component:
    • BFE Server:BFE forward engine (this repository, bfenetworks/bfe). BFE Server performs content based routing, load balancing and forwards the traffic to backend servers.
  • Control plane:responsible for management and configuration of BFE system, including below components:
    • API-Server:provides API and handles update, storage and generation of BFE config
    • Conf-Agent:component for loading config, fetches latest config from API-Server and triggers BFE Server to reload it
    • Dashboard:provides a graphic interface for user to manage and view major config of BFE

Refer to Overview in BFE document for more information

Besides, we also implement BFE Ingress Controller based on BFE, to fulfill Ingress in Kubernetes

🚀 Quick Start

This quick start is for users who want to get a running setup fast: build Docker images first, then deploy the Kubernetes example.

1) Build Docker images

From the repository root:

make docker

Notes:

  • make docker builds both prod and debug images. Image tags are derived from the VERSION file.
  • To override the image name, set BFE_IMAGE_NAME, for example:
make docker BFE_IMAGE_NAME=your-registry/bfe

If you want the Kubernetes deployment to use your locally built image, push it to a registry reachable by your cluster nodes (or load it into a local cluster), then update the bfe image mapping under images: in examples/kubernetes/kustomization.yaml.

For more details on building and pushing images (including make docker-push), see:

2) Deploy via Kubernetes example (kustomize)

cd examples/kubernetes
kubectl apply -k .
kubectl apply -f whoami-deploy.yaml

For details (image mirror settings, initialization notes, cleanup and finalizer troubleshooting, etc.), see:

Advantages

  • Multiple protocols supported, including HTTP, HTTPS, SPDY, HTTP2, WebSocket, TLS, FastCGI, etc.
  • Content based routing, support user-defined routing rule in advanced domain-specific language.
  • Support multiple load balancing policies.
  • Flexible plugin framework to extend functionality. Based on the framework, developer can add new features rapidly.
  • Efficient, easy and centralized management, with RESTful API and Dashboard support.
  • Detailed built-in metrics available for service status monitor.

Getting Started

Running the tests

Documentation

Book

  • In-depth Understanding of BFE (Released in Feb 2023)

    This book focuses on BFE open source project, introduces the relevant technical principles of network access, explains the design idea of BFE open source software, and how to build a network front-end platform based on BFE open source software. Readers with development capabilities can also develop BFE extension modules according to their own needs or contribute code to BFE open source projects according to the instructions in this book.

Contributing

  • Please create an issue in issue list.
  • Contact Committers/Owners for further discussion if needed.
  • Following the golang coding standards.
  • See the CONTRIBUTING file for details.

Authors

Communication

  • BFE community on Slack: Sign up CNCF Slack and join bfe channel.
  • BFE developer group on WeChat: Send a request mail with your WeChat ID and a contribution you've made to BFE(such as a PR/Issue). We will invite you right away.

License

BFE is under the Apache 2.0 license. See the LICENSE file for details.

Frequently asked questions

Is bfe free to use?

bfe is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does bfe do?

A modern layer 7 load balancer from baidu

What is bfe written in?

bfe is primarily written in Go. Its source is publicly available at https://github.com/bfenetworks/bfe, and it has 6,264 GitHub stars.