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.
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.
- Provides policy and configuration for all of the running data planes
Please see Github Releases.
$ go get -u github.com/nakabonne/sxds
$ go install github.com/nakabonne/sxds/cmd/sxds
Two servers, xds and cacher will listen.
$ sxds
There are only two things you have to do beforehand.
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
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-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
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
gRPC server that return response to data-plane.
REST server that caches resources.
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) |
- 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...