• Stars
    star
    1,498
  • Rank 31,328 (Top 0.7 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 7 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Go implementation of data-plane-api

control-plane

CI Status Go Report Card GoDoc

This repository contains a Go-based implementation of an API server that implements the discovery service APIs defined in data-plane-api.

Proto files

The Go proto files are synced from the upstream Envoy repository (https://github.com/envoyproxy/envoy) on every upstream commit.

Synchronization is triggered using the envoy-sync.yaml workflow.

Scope

Due to the variety of platforms out there, there is no single control plane implementation that can satisfy everyone's needs. Hence this code base does not attempt to be a full scale control plane for a fleet of Envoy proxies. Instead, it provides infrastructure that is shared by multiple different control plane implementations. The components provided by this library are:

  • API Server: A generic gRPC based API server that implements xDS APIs as defined in the data-plane-api. The API server is responsible for pushing configuration updates to Envoys. Consumers should be able to import this go library and use the API server as is, in production deployments.

  • Configuration Cache: The library will cache Envoy configurations in memory in an attempt to provide fast response to consumer Envoys. It is the responsibility of the consumer of this library to populate the cache as well as invalidate it when necessary. The cache will be keyed based on a pre-defined hash function whose keys are based on the Node information.

At this moment, this repository will not tackle translating platform specific representation of resources (e.g., services, instances of services, etc.) into Envoy-style configuration. Based on usage and feedback, we might decided to revisit this aspect at a later point in time.

Requirements

  1. Go 1.16+

Quick start

It's recommended to run the tests with make docker_tests as it executes the tests in the same environment as CI. This makes sure to produce a consistent set of generated files.

  1. Build and run tests:

    make docker_tests
  2. Take a look at the example server.

XDS API versioning

The Envoy xDS APIs follow a well defined versioning scheme.

Deprecated

V2 control-plane code has been removed and will no longer be supported. For previous conversations on support for various xDS versions, see here:

Note: It is recommended to use a previous SHA if there is still a need for V2.

Resource caching

Because Envoy clients are assumed to be ephemeral, and thus, can come and go away arbitrarily, the server relies on a configuration cache to minimize the client load on the server. There are several caches available in this repository:

  • Simple cache is a snapshot-based cache that maintains a consistent view of the configuration for each group of proxies. It supports running as an ADS server or as regular dis-aggregated xDS servers. In ADS mode, the cache can hold responses until the complete set of referenced resources is requested (e.g. the entire set of RDS as referenced by LDS). Holding the response enables an atomic update of xDS collections.

  • Linear is an eventually consistent cache for a single type URL collection. The cache maintains a single linear version history and a version vector for the resources in the cache. For each request, it compares the request version against latest versions for the requested resources, and responds with any updated resources. This cache assumes the resources are entirely opaque.

  • Mux cache is a simple cache combinator. It allows mixing multiple caches for different type URLs, e.g use a simple cache for LDS/RDS/CDS and a linear cache for EDS.

Usage

The example server demonstrates how to integrate the go-control-plane with your code.

More Repositories

1

envoy

Cloud-native high-performance edge/middle/service proxy
C++
24,546
star
2

ratelimit

Go/gRPC service designed to enable generic rate limit scenarios from different types of applications.
Go
2,245
star
3

gateway

Manages Envoy Proxy as a Standalone or Kubernetes-based Application Gateway
Go
1,496
star
4

envoy-mobile

Client HTTP and networking library based on the Envoy project for iOS, Android, and more.
Java
559
star
5

data-plane-api

[READ ONLY MIRROR] Envoy REST/proto API definitions and documentation.
Starlark
558
star
6

nighthawk

L7 (HTTP/HTTPS/HTTP2/HTTP3) performance characterization tool
C++
361
star
7

envoy-filter-example

Example of consuming Envoy and adding a custom filter
C++
330
star
8

java-control-plane

Java implementation of an Envoy gRPC control plane
Java
291
star
9

envoy-wasm

*ATTENTION!: The content of this repo is merged into https://github.com/envoyproxy/envoy and future development is happening there.
C++
205
star
10

xds-relay

Caching, aggregation, and relaying for xDS compliant clients and origin servers
Go
131
star
11

envoy-perf

Envoy performance testing
Python
130
star
12

learnenvoy

LearnEnvoy is a community content site that helps organizations get the most out of the Envoy proxy.
HTML
55
star
13

envoy-tools

Companion tooling for Envoy proxy
Go
49
star
14

envoy-openssl

Envoy OpenSSL extensions
C++
46
star
15

envoy-build-tools

Common build tools shared by the Envoy/UDPA ecosystem
Shell
43
star
16

envoy-website

Envoy Proxy website
HTML
41
star
17

katacoda-scenarios

Katacoda Scenarios for Envoy Proxy
Python
27
star
18

artwork

Envoy Logo and Artwork
11
star
19

toolshed

Python
10
star
20

playground

Playing nice with the neighbours
JavaScript
8
star
21

community

Issues global to the Envoy Proxy organization
8
star
22

ci-infra

HCL
7
star
23

management-plane-api

API definitions for the network management plane
Shell
5
star
24

envoybot

3
star
25

examples

Shell
3
star
26

envoy-distro

Starlark
2
star
27

archive

2
star
28

misc

1
star
29

apt

Starlark
1
star
30

mobile-website

Starlark
1
star