Asset Gateway and Compatibility Operations
Summary
This page documents how the gateway (YARP) routes asset traffic during the transition and how the compatibility endpoints preserve the monolith-shaped contract. An asset-routing feature flag routes only the asset slice to the asset-service when ON; otherwise the monolith serves. A shadow route and a route-source response header aid verification, and ESS composition pulls the caller's assigned assets from the asset-service list. Rollback is flipping the flag OFF.
Audience
- DevOps engineers operating gateway cutover.
- Support and QA engineers verifying route source.
- Solution architects assessing the transition strategy.
Reference Content
Routing flag
The AssetRouting:UseAssetService flag governs whether the asset slice routes to the asset-service:
| Flag state | Routing outcome |
|---|---|
| ON | Asset slice (/api/hr-operations/assets/**, /api/hr-operations/asset-requests, the HR-operations workspace) routes to asset-service |
| OFF | Monolith serves the asset slice |
Only the asset slice is affected; the flag does not move unrelated routes.
Shadow route and route-source header
There is an asset-service-shadow route and an X-Gateway-Route-Source response header whose values are asset-service, asset-service-shadow, or monolith. Operators can read the header to confirm which backend served a request.
Routing flow
ESS composition
The gateway /ess/assets path and the workspace assignedAssets slice fetch from the asset-service's asset list filtered by the caller's labor id, so the ESS view reflects the calling employee's assignments.
Compatibility contract
The compatibility endpoints (AssetCompatEndpoints) present the monolith-shaped surface so existing callers are unaffected while routing is switched. These endpoints are anonymous and tenant-scoped by design (private-mesh posture).
Rollback
Rollback of the cutover is flipping the flag OFF, returning traffic to the monolith. Retirement governance for the compatibility surface is Requires confirmation.
Source References
microservices/src/gateway-api/Program.csmicroservices/src/gateway-api/EssEndpoints.csmicroservices/src/asset-service/Api/AssetCompatEndpoints.cs
Related Articles
See Also
Keywords
asset gateway, routing flag, compatibility, shadow route, route-source header
Revision Information
- Status: Draft
- Last reviewed: 2026-07-17
- Review cycle: Quarterly