Last active
September 6, 2022 16:14
-
-
Save asayah/73c62872cac04b606fd643c18fb6a0a0 to your computer and use it in GitHub Desktop.
multi region routing/failover with gloo edge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: gloo.solo.io/v1 | |
kind: Upstream | |
metadata: | |
name: green-cell1 | |
namespace: gloo-system | |
spec: | |
healthChecks: | |
- timeout: 1s | |
interval: 1s | |
unhealthyThreshold: 1 | |
healthyThreshold: 1 | |
httpHealthCheck: | |
path: /health | |
failover: | |
prioritizedLocalities: | |
- localityEndpoints: | |
- lbEndpoints: | |
- address: green.cell2.asayah.solo.io | |
port: 80 | |
locality: | |
region: cell2 | |
zone: cell2 | |
loadBalancingWeight: 50 | |
- lbEndpoints: | |
- address: green.cell3.asayah.solo.io | |
port: 80 | |
locality: | |
region: cell3 | |
zone: cell3 | |
loadBalancingWeight: 30 | |
loadBalancerConfig: | |
localityWeightedLbConfig: {} | |
static: | |
hosts: | |
- addr: green.cell1.asayah.solo.io | |
port: 80 | |
--- | |
apiVersion: gloo.solo.io/v1 | |
kind: Upstream | |
metadata: | |
name: green-cell2 | |
namespace: gloo-system | |
spec: | |
healthChecks: | |
- timeout: 1s | |
interval: 1s | |
unhealthyThreshold: 1 | |
healthyThreshold: 1 | |
httpHealthCheck: | |
path: /health | |
failover: | |
prioritizedLocalities: | |
- localityEndpoints: | |
- lbEndpoints: | |
- address: green.cell1.asayah.solo.io | |
port: 80 | |
locality: | |
region: cell1 | |
zone: cell1 | |
loadBalancingWeight: 20 | |
- lbEndpoints: | |
- address: green.cell3.asayah.solo.io | |
port: 80 | |
locality: | |
region: cell3 | |
zone: cell3 | |
loadBalancingWeight: 30 | |
loadBalancerConfig: | |
localityWeightedLbConfig: {} | |
static: | |
hosts: | |
- addr: green.cell2.asayah.solo.io | |
port: 80 | |
--- | |
apiVersion: gloo.solo.io/v1 | |
kind: Upstream | |
metadata: | |
name: green-cell3 | |
namespace: gloo-system | |
spec: | |
healthChecks: | |
- timeout: 1s | |
interval: 1s | |
unhealthyThreshold: 1 | |
healthyThreshold: 1 | |
httpHealthCheck: | |
path: /health | |
failover: | |
prioritizedLocalities: | |
- localityEndpoints: | |
- lbEndpoints: | |
- address: green.cell1.asayah.solo.io | |
port: 80 | |
locality: | |
region: cell1 | |
zone: cell1 | |
loadBalancingWeight: 20 | |
- lbEndpoints: | |
- address: green.cell2.asayah.solo.io | |
port: 80 | |
locality: | |
region: cell2 | |
zone: cell2 | |
loadBalancingWeight: 50 | |
loadBalancerConfig: | |
localityWeightedLbConfig: {} | |
static: | |
hosts: | |
- addr: green.cell3.asayah.solo.io | |
port: 80 | |
--- | |
apiVersion: gateway.solo.io/v1 | |
kind: VirtualService | |
metadata: | |
name: demo | |
namespace: gloo-system | |
spec: | |
virtualHost: | |
domains: | |
- '*' | |
routes: | |
- matchers: | |
- prefix: / | |
routeAction: | |
multi: | |
destinations: | |
- weight: 20 | |
destination: | |
upstream: | |
name: green-cell1 | |
namespace: gloo-system | |
- weight: 50 | |
destination: | |
upstream: | |
name: green-cell2 | |
namespace: gloo-system | |
- weight: 30 | |
destination: | |
upstream: | |
name: green-cell3 | |
namespace: gloo-system |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment