Overview#
The Stream Distribution & Routing (SDR) consists of two components: Workload Distribution Agent and Workload Routing Agent.
Workload Distribution Agent
Retrieve stream events initiated by Video Storage Toolkit (VST)
Compile the workloads and evenly distributes them to underlying microservices by invoking their webhooks
Write the distribution mapping into a cache
Workload Routing Agent
Intercept an HTTP or gRPC call from an upstream caller and extract the stream identifier from the request header.
Look up the distribution mapping with the stream identifier
Route requests to the specific processing replica of a microservice
Reconciler
Reset underlying microservices when a stream becomes stale
The rule of thumb is that a microservice should be integrated with SDR if it satisfies both of the following criteria:
It needs to be notified when a stream event occurs at VST.
It is a stateful service that requires the incoming request to be consistently routed to the same processing replica.