hello world example for Multicloud applications
docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml up
UI served via Global Load Balancer -> Regional Load Balancer Linkerd -> Region Compute (node.js)
Access live version of the app http://localhost:9000
Oh no! A 404 page.
We can navigate to an upstream application routing-by-convention : http://localhost:9000/live/hello-cloud-app/hello
Let's add a Route using traffic-director:
curl -X POST \
http://localhost:8080/api/v1/routes \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"path":"/cloud","upstream":{"locator":{"service":"hello-cloud-app"}}}'
Verify that Route was added to traffic-director. In this reference implementation load balancers can poll a simple microservice for updates to the routing data: http://localhost:8080/api/v1/routes/entries
[
{
"path": "/cloud", // "vanilla" URL path that maps to any host
"uri": "/hello-cloud-app" // Service Discovery path for a Consul service in any available region
},
{
"path": "www.homeaway.com/hello", // host and path mapping to support different hosts
"uri": "/hello-cloud-app" //
},
{
"path": "/cloud/v/ce6836c6-7ca5-4944-8285-647aa9ae39b6", // variant defined as part of the routable path
"uri": "/live/hello-cloud-app" // Service Discovery path for a Consul tag and service in any available region
},
{
"path": "/cloud/f/84f88ddb-1ceb-4d52-b51a-66ff18d84191", // fallback defined as part of the routable path
"uri": "/fallback/hello-cloud-app" // Service Discovery path for a Consul tag and service in any available region
}
]
Refresh the Global Load Balancer http://localhost:9000/?refresh=true
Access a mapped path http://localhost:9000/cloud
Service Registry Consul UI http://localhost:8500/ui/dc1/services
Service Mesh Linkerd UI http://localhost:9990/delegator?router=%2Fhttp-consul#%2Fsvc%2Fhello-cloud-service
Service Metrics Prometheus UI http://localhost:9090/graph?g0.range_input=1h&g0.expr=rt%3Aclient%3Astatus%3A2XX&g0.tab=0