Creating a Failover Source
6 min
overview failover sources provide redundancy by combining two or more sources in a primary/backup/slate configuration sample configuration for failover source by default, the source defined as primary will be delivered to targets if it fails for some reason, a backup source (which could be identical to the primary or something else) will be used until the primary is a available again optionally, you can also have a slate source which will be used if the primary and backup sources are all unavailable the general process is create two or more sources create a failover source that combines the multiple sources in a primary/backup/slate (slate is optional) scheme create a pass through channel for the failover source so that it can be assigned to targets all this can be done in the zen master ui, but can also be done through the api here we will just create a failover channel if you need to see how to create the initial sources to be combined, or the channel or the target, see creating a source, channel, and target docid\ fcx7vkz9lrrzw06wokm 5 setup to create your failover source, you will first need to complete the following steps, either in the zen master ui or through the api if you haven't already done so, set up postman (either the desktop or online version) to work with the zen master api (see step 2 getting started with postman docid 8rvjfs6 skyedlj8wpyf7 ) create a manual cluster in zen master add a broadcaster with at least 3 inputs to zen master to your manual cluster create three basic sources from the three broadcaster inputs create or choose a tag that you will attach to your failover source postman instructions get ids that will be needed to create the failover source first we will get id values for the broadcaster, cluster, tag, and sources that will be required for the api requests that we will be making get the id for your broadcaster cluster by going to the clusters > get list all clusters request in postman uncheck all the request parameters unless you know the exact name of you your cluster, in which case you can set that as the value of the name parameter to return just that object request parameters with or without the name parameter, click send to submit the request if you used the name parameter, there should be just one object in the response if not, you will get all the cluster objects, but you can find the one you are looking for by searching the response json for some portion of the cluster name searching in the postman response save the cluster id for use in steps below now do the same for broadcasters get broadcasters , using the name parameter if you have the exact name, or find it in the list and save its id as well you also need to get or create a tag id to do this, go to the tags section of the api and either get a list of all tags and choose one, or use the post request to create a new one if you create a new one, just go to the body of the post request and enter a name for the tag you will find the id for the tag in the response after you send the request create tag request body finally, use the sources get list sources request to get the id values for your 3 sources if you know the exact name you gave each source, you can retrieve them one by one using the name parameter create the failover source now that you have your ids, go to sources>failover> post create failover source for the body , use the following { "broadcaster cluster id" your cluster id, "failoversources" \[ { "priority" 2, "source id" the id of the primary source you created, "min bitrate" 1000 }, { "priority" 1, "source id" the id of the backup source you created, "min bitrate" 1000 }, { "priority" 0, "source id" the id of the slate source you created, "min bitrate" 500 } ], "latency" 2000, "merge mode" "content", "name" "a name for your failover source", "resource tag ids" \[ your tag id ], "target broadcaster id" your broadcaster id } you will need to replace all of the all caps with the ids you collected in the previous section, and a unique name for your source, so that the code you paste into postman looks something like this sample request body click send to submit the request if you do not get a success response, check to make sure you replaced all of the all caps items correctly and did not put quotation marks around any id values (they are integers)