# how to limit the number of concurrent streaming sessions per user

**URL:** https://community.wowza.com/t/how-to-limit-the-number-of-concurrent-streaming-sessions-per-user/42541
**Category:** Wowza Streaming Engine
**Created:** [March 26, 2014, 6:58am UTC](https://community.wowza.com/t/how-to-limit-the-number-of-concurrent-streaming-sessions-per-user/42541 "2014-03-26T06:58:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jee\_Vang](https://avatars.discourse-cdn.com/v4/letter/j/b77776/32.png) [@Jee\_Vang](https://community.wowza.com/u/Jee_Vang)
#### Post date: [March 26, 2014, 6:58am UTC](https://community.wowza.com/t/how-to-limit-the-number-of-concurrent-streaming-sessions-per-user/42541/1 "2014-03-26T06:58:45Z")

</div>

i would like to know if anyone has a module example or any approach to limiting the number of concurrent streaming sessions per user account. my users are managed outside of wowza. the user can log into my app from all over the place (e.g. web or mobile), but i would like to set it up so that no matter how many places the user is logged in from, wowza will stream to only 2 devices at a time (or stream at most 2 concurrent videos-on-demand).

is this possible with wowza?

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [March 26, 2014, 1:00pm UTC](https://community.wowza.com/t/how-to-limit-the-number-of-concurrent-streaming-sessions-per-user/42541/2 "2014-03-26T13:00:51Z")

</div>

It is as Jason described above your post in the [other thread](https://www.wowza.com/forums/showthread.php?30463-Limit-the-number-of-concurrent-streams-per-user&p=135616&posted=1#post135616) you wrote to. That there is not really a concept of users in Wowza, so you will have to construct something around onConnect for RTMP clients and [onHTTPSessionCreate](https://www.wowza.com/docs/how-to-control-access-to-http-streams-cupertinostreaming-sanjosestreaming-smoothstreaming-mpegdashstreaming%28cupertinostreaming-smoothstreaming-sanjosestreaming-mpegdashstreaming%29) and [onRTPSessionCreate](https://www.wowza.com/docs/how-to-control-access-to-rtsp-rtp-streams) for HTTP and RTPS clients.

Take a look at [this article](https://www.wowza.com/docs/how-to-do-user-authentication-for-flash-rtmp-client-using-jdbc-connection-to-mysql-database), and [this article](https://www.wowza.com/docs/how-to-do-file-based-rtmp-authentication-with-url-query-strings-onconnectauthenticate2%28ModuleOnConnectAuthenticate2%29)

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [March 26, 2014, 1:29pm UTC](https://community.wowza.com/t/how-to-limit-the-number-of-concurrent-streaming-sessions-per-user/42541/3 "2014-03-26T13:29:26Z")

</div>

This article on [tracking usage by “user”](https://www.wowza.com/docs/how-to-track-streaming-by-users) might also be useful to you

Richad
