Envoy looks plenty useful, but its reference configurations are designed for a scale I don't have to deal with yet. A single layer of proxies should be able to proxy both customer requests and internal requests.
docker-compose up
in one terminalcurl -D - http://0.0.0.0:8080/first
in another
You should see curl
output resembling:
HTTP/1.1 200 OK
date: Sun, 01 Oct 2017 05:57:44 GMT
content-length: 13
content-type: text/plain; charset=utf-8
x-envoy-upstream-service-time: 12
server: envoy
first
second
We're running four containers:
- The
first
service, which needs to talk to thesecond
before replying - The
second
service, - The
envoy
service, and - The
discovery
service answering Envoy's/v1/clusters
and/v1/registration
requests
To demonstrate both customer-service and service-service proxying, we've set up first
to talk to second
via envoy
.