Request Routing
Overview
Request routing refers to the ability to redirect requests coming into a given service to an alternative destination, such as a sandbox fork of the service, based on metadata contained within that particular request. This allows each sandbox to selectively replace only some services in the overall set of microservices with forks, so you can test unmerged changes without having to launch a copy of every service in the chain.
The necessary sandbox metadata for routing is automatically added to all requests that reach your services through a endpoint. If you additionally set up context propagation within each service, request routing can take effect not only for that initial request, but also for any subsequent service-to-service requests in the chain.
Routing Requests
The requests can then be examined for sandbox metadata and either sent to a fork of the service or passed through to the baseline service.
Signadot supports two different routing approaches, distinguished by where the routing decision is made:
Destination-side Routing (DevMesh)
With DevMesh routing, the routing decision happens at the destination service's pod. A DevMesh sidecar container on the destination service (e.g., Service B) examines incoming requests and routes them to either the sandbox fork or the baseline service based on metadata in the request.
The DevMesh sidecar is injected into baseline workloads and acts as a L7 HTTP or gRPC proxy that provides lightweight request routing functionality. The sidecar examines requests for sandbox metadata and decides whether to route them to a fork or pass them through to the main container.
Service A Pod Service B Pod (with DevMesh Sidecar)
│ │
Main Container ──────────────────>