Wowza Community

wowzasessionid is appended to the actual URL

I have an issue with the URL that is passed to the Custom Alias Module.

Server Set Up

===========

A bunch of wowza servers running on windows load balance.

The URL assigned to iPhone player looks like this…

http://:1935/vod/playlist.m3u8?v=Ed809fsSDS&h=231kdjsosdfklsjf

for RTMP players

rtmp:///vod/playlist.m3u8?v=Ed809fsSDS&h=231kdjsosdfklsjf

with v and h parameters.

This set up works fine for RTMP, HTTP (IOS) partially.

The issue is, when I say HTTP (IOS) works partially means, HTTP works fine as long as if I specify a particular server (Physical server IP/Name) instead of the Load Balance Name. (NLB)

After troubleshooting, I found out that while specifying the URL to point to NLB

the URL coming to the

resolvePlayAlias (IHTTPStreamerSession) methods look like this

http:///vod/playlist.m3u8?wowzasessionid=1234242&v=Ed809fsSDS&h=231kdjsosdfklsjf

an extra wowzasessionid parameter is appended to the actual URL

As mentioned, this extra parameter is not added while pointing to the physical server IP/name.

This is creating some issue, and wondering why this is behaving like this? Is there a way to avoid this.

Regards

Larry

Larry,

You are missing stream name in these URLs

I’m not sure how your load balancer works, but the iOS client has to get something like this:

http://[wowza-edge-address]:1935/vod/[stream-name]/playlist.m3u8?v=Ed809fsSDS&h=231kdjsosdfklsjf

Richard

Hi Larry,

It is most likely not the extra parameter that is causing the issue. It is more likely that the load balancer is sending the requests to the wrong server after the initial connection.

With rtmp, only a single port number is used on the client side for the whole session so this works fine with the load balancer as it only sees one connection.

With http connections, the player connects and gets the current packets for the stream and then disconnects. When it needs new packets, it reconnects to get the next lot of packets. This is where the wowzasessionid comes into play so that the server knows which session has received which packets.

The problem when using a load balancer is that each of these connections comes from a different port number on the client end so the load balancer assumes it is a totally new connection and so will send it to a different edge server. The edge server doesn’t recognize the sessionid so rejects the session.

You should be able to handle this fairly easily in the load balancer to make sure related connections go to the same edge server. I am not 100% sure how this is done on a windows load balancer but on a linux lvs system, it is done using a persistence setting on the load balancer config where any connection from an ip address in a set time will always go to the same server.

You will most likely see the same problem with all the http stream types (silverlight & flash http)

Roger.

Hi Roger,

Your explanation makes logical sense. If this true I have a work around by removing the parameters and manage the sessions.

Just want to understand before I make those adjustments. Thanks all.

Larry P

Hi Larry,

If it is a layer 4 load balancer (LVS F5 etc) then it is only working on the ip address / port combination which is why you need to set up persistence to allow for the port number changes.

Layer 7 load balancers work at the application level and you should be able to balance based on the url as well.

Roger.

Larry,

From lack of experience, I really don’t get hardware load balancers in this context, to be honest. The Wowza load balancer that I am familiar with takes a much different approach. Let me see who I can loop in.

Richard

Hi Richard,

Thanks for the reply.

The StreamNameAlias module will actually change the stream name based on our rules.

http://[wowza-edge-address]:1935/vod/[stream-name]/playlist.m3u8?v=Ed809fsSDS&h=231kdjsosdfklsjf

I don’t need a stream name that is assigned to the IOS devices… It works perfectly. The only issue is it is adding the wowzasessionid parameter.

Thanks

Larry

Hi Roger,

Your explanation makes logical sense. If this true I have a work around by removing the parameters and manage the sessions.

Just want to understand before I make those adjustments. Thanks all.

Larry P

Larry,

Most load balancers allow you to set a stickiness policy (which they do either through their own cookies or via application session cookies). Wowza 3 allows you to set application session cookies.

–dan