Advanced Routing Configuration
Declarative routing priority, canary rollout, and rollback.
Manage routing with declarative rules and explicit priorities so behavior stays predictable after deploy.
Priority levels
| Level | Rule type | Example | Priority range |
|---|---|---|---|
| L1 | Security / emergency block | Blocked IP, bad headers | 200+ |
| L2 | Tenant / product routing | X-Tenant based | 100–199 |
| L3 | Default business | Path + Method | 10–99 |
| L4 | Fallback | default target | 0–9 |
<route priority="120" match="method=POST,path=/v1/payment/*"> <when header="X-Tenant=bank-a" target="svc-pay-a"/> <when header="X-Tenant=bank-b" target="svc-pay-b"/> <otherwise target="svc-pay-default"/> </route>
Update routing rules
- Add rules under
routes/XML and assign priorities. - Validate match success rate and fallback ratio in staging.
- Roll out to production via canary (5% → 25% → 100%).
- On issues, roll back to the previous XML revision immediately.