How to do network auto-recovery from Expression Encoder 4?
If you use Expression Encoder 4 for live smooth streaming, you probably have already hit this situation a few times. Say you’ve set up your live encoder to push to a remote publishing point on an IIS Media server and everything is running fine. All of a sudden, somehow the network connection between your encoding facility and the remote IIS ingest servers gets broken. Because today Expression Encoder 4 does not support network auto-recovery, even if the network gets back to normal, Expression Encoder will still show the error message while the remote publishing point keeps waiting for failover streams. The end result is that the live streaming has to stop. And the only way to fix that problem would be to restart everything (encoders, servers and clients) which also means the clients would lose access to all the DVR data that belongs to the previous session.
Ok, so how do we fix this? Of course the obvious solution would be to enable network auto-recovery feature in future Expression Encoder releases. But before that happens, there is actually a simple workaround that you can try today. All it takes is to insert another IIS server into the picture. If you had a chance to read one of my previous blogs here, you probably already know that live smooth streaming publishing point can be configured to push to other publishing points downstream (see the “Push Output” section). While doing that, it is also capable of handling network conditions with auto-reconnect which is what you would want between your encoder box and the remote IIS server in this case.
The diagram below shows how this solution works. First you install and configure another local IIS Media server that’s either on the same machine as the encoder or in the same LAN (so that the connection between the encoder and this IIS box should never be an issue). Then you configure the local IIS server to push to your remote IIS servers. IIS Media server’s publishing point supports simultaneously pushing to multiple remote publishing points (and do auto-recovery for each of them) so you could optionally have a primary and backup remote server for load balance for failover (as the diagram shows below). Now with this setup, if anything happens with your WAN that’s connecting your encoding facility and the remote IIS servers, the local IIS server can handle all the network auto-recovery for you.
Here is how you can set it up:
1. Install IIS Media Services and Expression Encoder 4 on the same machine or co-located two machines in the same LAN.
2. On your local IIS Media server, create a “push” publishing point which in turn pushes to your remote publishing points. The example below shows how to let it push to two publishing points. Enable the “Start publishing point automatically …..” option to let it auto-start. In most cases, you probably don’t need this server to do any archiving or serving any client requests, so you could disable those two options and never need to worry about whether you have enough disk space for archiving/DVR buffer.
3. In your Expression Encoder, configure the live session to push to the local IIS publishing point. You could just use “localhost” as the machine name if the publishing point runs on the same machine.
4. Once you start the live encoding, the local publishing point will automatically get started which in turn relays the streams to the remote publishing points. You should be good to go!
By using a local IIS server, if you’re running IIS Media Services 4, you also get the additional benefit of being able to view detailed fragment information right on the publishing point UI. Plus it also shows the connection detail for your remote publishing points. See my blog here for details.