- Does traefik / traefik mesh can handle multi regional arquitecture to solve request to the right user region?
- Any other self hosted solution recomendation?
Rules:
- Each region is independent and one region downtime does'nt affect other region
- User authentication metadata is replicated across all regions
- Requests with an authentication token can enter the network from any region and be verified
- The default entry point for authentication request is usa-region-1
- The ingress controller / service mesh determines who the user is and in which region their account is hosted
- The authentication service add "user_region" headers to the request and "precedence_region" to prevent internal loop
- Detects that destionation region is not current region and proxies the request to the correct region with extra headers added
Diagram:
┌───────────────────────────────────────────────┐
│ │
│ usa-region-1 │
│ ┌───►/app-1/*│
│ │ │
┌───┼──► Load ──────► ┌── Ingress ────┤ │
│ │ Balancer │ Controller ├───►/app-2/*│
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ └───►/app-3/*│
│ │ │ │ │
│ │ │ │ │
│ │ │ └─Authentication │
User──────► Cloudflare ──────►│ │ │ Service │
Request │ │ │ │
│ └──────────────────┼────────────────────────────┘
│ │ *proxie the request*
│ ┌──────────────────┼────────────────────────────┐
│ │ │ │
│ │ europe-region-1 │ │
│ │ │ ┌───►/app-1/*│
│ │ │ │ │
└───┼──► Load ───────► └── Ingress ────┤ │
│ Balancer Controller ├───►/app-2/*│
│ │ │ │
│ │ │ │
│ │ └───►/app-3/*│
│ │ │
│ │ │
│ └─Authentication │
│ Service │
│ │
└───────────────────────────────────────────────┘