Skip to content
simple-xds that provides configuration and route table to data-plane for service discovery
Go Makefile Dockerfile
Branch: master
Clone or download
Latest commit 68a85fe Feb 1, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Add circleci config Nov 21, 2018
cmd/sxds Move main pacakge to cmd directory Nov 21, 2018
config Add config test Nov 3, 2018
doc FIx typo in resources doc Nov 23, 2018
domain Update to specify that Resouces meets proto.Message Nov 21, 2018
media Add architecture image Nov 3, 2018
sample Add resource samples Dec 6, 2018
server Move main pacakge to cmd directory Nov 21, 2018
vendor
.gitignore Add gitignore Nov 3, 2018
.goreleaser.yml Move main pacakge to cmd directory Nov 21, 2018
Dockerfile Move main pacakge to cmd directory Nov 21, 2018
Dockerfile-envoy Add Dockerfiles for e2e test Nov 2, 2018
Gopkg.lock Add hasher test Nov 3, 2018
Gopkg.toml Initial dep Nov 2, 2018
LICENSE Initial commit Nov 2, 2018
Makefile Add release recipe Nov 3, 2018
README.md Update README.md Feb 1, 2019
docker-compose.yml Move main pacakge to cmd directory Nov 21, 2018

README.md

sxds

CircleCI Release Software License Go Doc

Simple xds for data-plane in ServiceMesh.
Sxds enables service discovery, dynamic updates to load balancing pools and routing tables, and supports any data-plane that conforms to data-plane-api.
The communication protocol with data-plane is supported only by gRPC.

This README assumes you're familiar with the data-plane-api already.

Motivation

Using an orchestration tool makes it possible to achieve Service Mesh relatively easily.
But if you don't use it, you can't benefit from a great tool such as Istio!
If you want to realize Service Mesh in such an environment, sxds is one of effective methods.

Feature

  • Provides policy and configuration for all of the running data planes
    • Listener discovery service (LDS)
    • Cluster discovery service (CDS)
    • Route discovery service (RDS)
    • Endpoint discovery service (EDS)

Installation

Binaries

Please see Github Releases.

From source

$ go get -u github.com/nakabonne/sxds
$ go install github.com/nakabonne/sxds/cmd/sxds

Usage

Run

Two servers, xds and cacher will listen.

$ sxds

Required settings

There are only two things you have to do beforehand.

Set resources

sxds caches resources and returns DiscoverResponse for data-plane.
so you need to send the json file to the cacher server.
Please create json while referring to the document.

$ curl -XPUT http://{IP_ADDRESS}:8082/resources/sidecar -d @sidecar.json

Data-Plane settings

In order to suppress memory consumption, sxds cache resources for each node type.
And sxds gets node type from node id, so you need to follow the naming convention.
Please add node_type to prefix like "sidecar-app1" for naming node id of data-plane.

envoy

[envoy-config]

Add sxds cluster to static_resources and specify it in dynamic_resources.
See sample.

[specification of node id]

Add node_type to the prefix of the name given to the --service-node option.

$ envoy --service-node sidecar-app1 --service-cluster app1

Optional settings

SXDS_PRODUCTION=false # default: false
SXDS_ADS_MODE=false   # default: false
SXDS_XDS_PORT=8081    # default: 8081
SXDS_CACHER_PORT=8082 # default: 8082

For ADS mode, please click here

Architecture

architecture

xDS

gRPC server that return response to data-plane.

cacher

REST server that caches resources.

Terms

term meaning
node type The role of node which put each data-plane(e.g. sidecar, router)
resources Data to use for DiscoveryResponse(e.g. listeners, clusters)

TODO

  • Make detailed documentation on resource json
  • Make sxdsctl that is cli tool for put resources
  • Update to be available synchronous (long) polling via REST endpoints
  • Automatic generation of resources json
  • More test...
You can’t perform that action at this time.