CloudFront and nDVR - Ramifications of Sessionless Wowza Origin
I'm trying to set up CloudFront for the first time (following
the guide here) and have some questions about what all the fuss is about Wowza being sessionless.
It says "URL query parameters in player requests aren't supported. This includes wowzaplaystart and wowzaplayduration for VOD playback and wowzadvrplayliststart and wowzadvrplaylistduration for nDVR playback." I took this to mean that the nDVR AddOn won't work when using CloudFront (or possibly any other CDN which uses edge servers). Is this correct?
It also says "If you want to use Wowza nDVR as an HTTP caching origin, you must also add this property to the DVR/Properties container." This seems to contradict what I understand from #1 (which probably means I'm not really understanding). Why set up nDVR as an HTTP caching origin if it doesn't work with CloudFront?
Then there is this note under "Creating the CloudFront distribution":
Note: The CloudFront Distribution setup includes the
Forward Query Strings option, which enables CloudFront edge locations to include query strings for session-based communication in request URLs that it forwards to the Wowza Media Server HTTP caching origin. Because communication with the Wowza Media Server HTTP caching origin is sessionless, query string parameters that are included in forwarded URLs may not work as expected.
Does this mean that Forward Query Strings should set to No? That is the default, and it says it improves caching. But IF nDVR works with CloudFront (and now I'm not sure if it does or doesn't), do I need to set this to Yes?
Those are my questions surrounding CloudFront and nDVR. As an aside, I think this guide is the least helpful of the ones that I've gone through so far. Namely, step 5 under "Creating the CloudFront distribution," which says "Configure the remaining settings on the Create distribution page and then click the Create Distribution button." There are a lot of settings on that page! I know there's a definition of the terms here, but it would be nice if the guide gave some guidance as to what to choose for a basic CF distribution when using a Wowza E2C instance as the origin.
Wowza nDVR with AWS Cloudfront is supported. There are steps in the basic
Cloudfront guide, but additionally, in this case I think you will have to enable forward querystrings because the nDVR playback url is appended with a querystring ?DVR
When using nDVR and Cloudfront, and in other cases as well, it is best practice to set the nDVR WindowDuration of 2 hours or less. If the WindowDuration is longer or not set, you should use the
Playlist Request API. With forward querystrings enabled, you can use the start and duration parameters in your playback client to create a cache with that length, then subsequent clients will playback from that cache. For more complex requirements, different start and length parameters, there are ways using StreamNameAlias addon, but it gets a little complicated.