GNU/Linux ◆ foot ◆ fish 146 views

We start one upstream client node :cli@h11 (right) and two node service providers :service@any on h12 and h21 hosts (left). We Node.connect/1 :cli@h11 to :service@any “node service” and use :erpc.call/4 with :inet.gethostname/0 to know which node was connected by sidecar proxy round-robin: connected node service is running on h21 host. After stopping :service@any on h21 with Node.stop/0 and running :erpc.call/4 again:

  1. Service down event is detected by service mesh for service on h21. Traffic is automatically redirected by sidecar proxy to remaining “service@any” healthy instance on h12 discoverable with Consul registry.
  2. Erlang executes handshake with new node, valid cookies are still required.
  3. We receive response from healthy “service@any” h12 instance.