OvenMediaEngine supports clustering and ensures High Availability (HA) and scalability.
OvenMediaEngine supports the Origin-Edge structure for cluster configuration and provides scalability. Also, you can set Origin as
Secondaryin OvenMediaEngine for HA.
The OvenMediaEngine running as edge pulls a stream from an external server when a user requests it. The external server could be another OvenMediaEngine with OVT enabled or another stream server that supports RTSP.
OvenMediaEngine provides OVT protocol for passing streams from the origin to the edge. To run OvenMediaEngine as Origin, OVT port, and OVT Publisher must be enabled as follows :
The role of the edge is to receive and distribute streams from an origin. You can configure hundreds of Edge to distribute traffic to your players. As a result of testing, a single edge can stream 4-5Gbps traffic by WebRTC based on AWS C5.2XLarge. If you need to stream to thousands of people, you can configure and use multiple edges.
The edge supports OVT and RTSP to pull stream from an origin. In the near future, we will support more protocols. The stream pulled through OVT or RTSP is bypassed without being encoded.
To run OvenMediaEngine as Edge, you need to add Origins elements to the configuration file as follows:
<Origin>is a rule about where to pull a stream from for what request.
<Origin>has the ability to automatically create an application with that name if the application you set in
<Location>doesn't exist on the server. If an application exists in the system, a stream will be created in the application.
The automatically created application by
<Origin>enables all providers but if you create an application yourself, you must enable the provider that matches the setting as follows.
<!-- You have to enable the OVT provider
because you used the ovt scheme for configuring Origin. -->
<!-- If you set RTSP into Scheme,
you have to enable RTSPPull provider -->
NoInputFailoverTimeout (default 3000)
NoInputFailoverTimeout is the time (in milliseconds) to switch to the next URL if there is no input for the set time.
UnusedStreamDeletionTimeout (default 60000)
UnusedStreamDeletionTimeout is a function that deletes a stream created with OriginMap if there is no viewer for a set amount of time (milliseconds). This helps to save network traffic and system resources for Origin and Edge.
For a detailed description of Origin's elements, see:
Origin is already filtered by domain because it belongs to VirtualHost. Therefore, in Location, set App, Stream, and File to match except domain area. If a request matches multiple Origins, the top of them runs.
Pass consists of Scheme and Url.
<Scheme>is the protocol that will use to pull from the Origin Stream. It currently can be configured as
If the origin server is OvenMediaEngine, you have to set
You can pull the stream from the RTSP server by setting
<Scheme>. In this case, the
<RTSPPull>provider must be enabled. The application automatically generated by Origin doesn't need to worry because all providers are enabled.
Urlsis the address of origin stream and can consist of multiple URLs.
ForwardQueryParamsis an option to determine whether to pass the query string part to the server at the URL you requested to play.(Default : true) Some RTSP servers classify streams according to query strings, so you may want this option to be set to false. For example, if a user requests
ws://host:port/app/stream?transport=tcpto play WebRTC, the
?transport=tcpmay also be forwarded to the RTSP server, so the stream may not be found on the RTSP server. On the other hand, OVT does not affect anything, so you can use it as the default setting.
The final address to be requested by OvenMediaEngine is generated by combining the configured Url and user's request except for Location. For example, if the following is set
OriginMapStore is designed to make it easier to support autoscaling within a cluster. All Origin Servers and Edge Servers in the cluster share stream information and origin OVT URLs through Redis. That is, when a stream is created on the Origin server, the Origin server sets the app/stream name and OVT url to access the stream to the Redis server. Edge gets the OVT url corresponding to the app/stream from the Redis server when the user's playback request comes in.
This means that existing settings do not need to be updated when extending Origin servers and Edge servers. Therefore, all Origins can be grouped into one domain, and all Edges can be bundled with one domain. OriginMapStore allows you to expand Origins or Edges within a cluster without any additional configuration.
OriginMapStore functionality has been tested with Redis Server 5.0.7. You can enable this feature by adding the following settings to Server.xml of Origin and Edge. Note that must be set in Server.xml of the Origin server. This is used when Origin registers its own OVT url, so you just need to set a domain name or IP address that can be accessed as an OVT publisher.
<!-- In order to use OriginMap, you must enable OVT Publisher in Origin and OVT Provider in Edge. -->
<!-- This is only needed for the origin server and used to register the ovt address of the stream. -->