Service discovery with etcd
Membrane offers service discovery so clients/services can communicate through virtual endpoints with other services without knowledge of the real endpoint.
Publishing
A client wants to send requests to services without knowing their endpoint address beforehand. Instead it wants to configure itself at runtime and be notified of address changes from a central registry. The service proxy of a target can be published to a registry.
Figure 1 shows how the endpoint of a service proxy of a target service is published and a client retrieving the endpoint configuration. The procedure is as follows: (1) Membrane publishes the configured services to the etcd registry. (2) A client connects to etcd and retrieves the endpoints to the available services. (3) Based on the retrieved configuration the client can now send its request. (4) The service proxy forwards the request to the target.
Dynamic configuration
Membrane can be used to discover services at runtime. Service proxies are published to and can be created and updated dynamically from a registry.
Figure 2 shows a client sending requests to a dynamically configured membrane. The procedure is as follows: (1) A service is published to etcd. (2) Membrane gets the configuration from etcd. (3) Membrane configures a service proxy dynamically pointing to the published service. (4) The client sends its request to a service proxy hosted on membrane. (5) The service proxy forwards the request to the target.
Getting started
See examples/service-discovery-with-etcd/README.txt in the membrane folder and try it yourself.