Media Streaming Mesh
An open source project for supporting RTP-based real-time media applications in Kubernetes clusters
Today's service meshes generally only support TCP-based applications (and in fact are optimised for HTTP-based web applications). Any support for UDP that is added to service meshes is likely to be focussed on enabling QUIC (since HTTP/3 runs over QUIC).
Real-time applications generally run over UDP rather than TCP. Media Streaming applications typically rely on RTP (the Real-time Transport Protocol) - which runs on top of UDP, and hence RTP will be the initial focus of Media Streaming Mesh. RTP enables measurement of loss and jitter as it carries sequence numbers and timestamps in the packet header and we will monitor these in Media Streaming Mesh.
One challenge with RTP is that it often runs on ephemeral UDP ports which are assigned by a TCP-based control channel such as SIP or RTSP. However proxying these TCP-based protocols will enable us to implement URL/URI-based routing and to map the UDP ports dynamically.
Our current demo implementation relies on a simple Go-based proxy that runs as a pod sidecar (plus a micro-CNI that creates IPtables rules to direct traffic into the sidecar, and a mutating webhook that injects the sidecar proxy into labelled pods).
Longer term our expectation is to implement:
- SPIFFE/SPIRE for pod to pod authentication
- A per-node RTP data-plane proxy (written in Golang)
- A per-cluster RTSP control-plane proxy (also in Golang)
- A per-pod MSM stub that directs traffic into the control plane and data plane (most likely written in Rust).
With that baseline we will then be able to implement other protocols (such as SIP, RIST, SMTPE 2110, "raw" RTP etc.)
In order to keep footprint light one key will be to deploy only the required components for the service being implemented.
For inter and extra-cluster traffic the per-node RTP/RTSP proxies will act as data-plane gateways, and the per-cluster proxies will act as control-plane gateways.
For enhanced performance we may also implement a high-performance data-plane proxy using VPP. This will be especially useful for gateway nodes, and for use-cases involving uncompessed UHD video.
We're looking for potential users of Media Streaming Mesh to help us define the solution, and for developers to help us create it!
Please do join ourSlack Channel.