Skip to main content
Participant
July 7, 2011
Question

How to restrict the number of users on live or vod applications.

  • July 7, 2011
  • 1 reply
  • 815 views

You can restrict the number of users on a flash server applications using server-side scripting.

Here is how.

1. Go to the flash server root/documentation/samples (Lets say its a live streaming aplication).

2. Copy the livestreams folder to your flash server root/applications and paste it inside the folder.

3. Open the main.asc file that is inside the folder you just pasted.

4. At the end of the code paste the following code:

application.onConnect = function(clientObj){

if (application.clients.length >=500){

application.rejectConnection(clientObj);

trace ("Too many users... rejecting new connection");

}else{

application.acceptConnection(clientObj);

}

}

On this code the application will accept 500 connections. You can change the number of connections to any number.

Remember that your Flash Live Encoder needs at least one connection to send the video to the server.

5. Make sure to grab the application.xml from the live application folder and copy it to your new application folder.

This keeps the live streaming alive as a live application should work.

6. Open the Flash Server Administration console and load the application to the server.

Thats it. you can restric the number of users on any applications on your flash server.

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    July 12, 2011

    Step 1 to 5 complited but step 6 fails. I can´t load the application with Flash Administration Console. It automaticly unloads....

    Is there another workaround to restrict the number of users? And also, is there a common way to test the fmscore how much users the servers performance can handle?

    Thanks for any help!

    Participant
    July 12, 2011

    Once you pick the new application from the new instance menu press enter.

    Thats it.

    On the performance of you machine. You should test it with a high number of streams and then take a look at your sever details on the admin console. There you should see the graphics of cpu, and memory and then do the math.

    I have a server with a Xeon 1.86ghz, 3GB of memory and it was able to handle 1300 streams with CPU running a 90%.