random::entropy
Search   
Welcome News Sitemap Search Login
spreed now!
News
2007-10-24
Red5 speedup
Connect more clients in less time!
Read more More
2007-03-30
Security with Red5 0.6
New tutorial online...
Read more More
Donations
If you like the stuff I write about on my page or use one of my libraries and feel generous to support further development, feel free to donate something from the links below.
Support this site!
Unterstütze diese Seite!
Support this site!
Amazon.com
Amazon.de
Paypal
Quicklinks

Joachim Bauch's virtual home

random :: entropy

Welcome to the homepage of Joachim Bauch aka Magog.

You can find informations about my work and hobbies on this page - powered by icoya OpenContent.

Joachim (Magog)

2007-10-24

Red5 speedup

Connect more clients in less time!

It has been a while since my last news entry, but I was rather busy with real life(tm) stuff and doing fancy things with Red5. However I just wanted to give you a small sneak peek at a nice speed improvement I just commited to the Red5 trunk and that will be available in the next version.

Up to today, the codepath for connecting clients ran through a synchronized block that made Red5 perform like a single-threaded server - especially if authentication code or database lookups were done for every new user. With the new changes, these things can run multithreaded just as the rest of the server, resulting in rather large speed gains (see below for benchmarks). To make use of the new features, just extend the class MultiThreadedApplicationAdapter instead of the previous ApplicationAdapter and make sure your code is thread-safe ;-)

The following benchmarks have been executed against an application that waited 250 msec in appConnect and result in up to 14 times the number of connections per second!

Regular ApplicationAdapter and old versions of Red5:

# rb -c 5 -n 50 rtmp://localhost/delayed
Benchmarking rtmp://localhost/delayed (be patient).....done
Waiting for threads to stop.....done

Server Hostname:        localhost
Server Port:            1935

Application path:       delayed

Concurrency level:      5
Time taken for tests:   12.6250 seconds
Complete requests:      50
Failed requests:        0
Requests per second:    3.96 [#/sec]
Time per request:       1262.5 [ms] (mean)
Time per request:       252.5 [ms] (mean, across all concurrent requests)

Percentage of the requests served within a certain time (ms)
  50%   1016
  66%   1312
  75%   1515
  80%   1515
  90%   1750
  95%   1765
  98%   1782
  99%   1782
 100%   1782 (longest request)

# rb -c 20 -n 200 rtmp://localhost/delayed
Timeout

# rb -c 40 -n 400 rtmp://localhost/delayed
Timeout

New MultiThreadedApplicationAdapter:

# rb -c 5 -n 50 rtmp://localhost/delayed
Benchmarking rtmp://localhost/delayed (be patient).....done
Waiting for threads to stop.....done

Server Hostname:        localhost
Server Port:            1935

Application path:       delayed

Concurrency level:      5
Time taken for tests:   3.4070 seconds
Complete requests:      50
Failed requests:        0
Requests per second:    14.68 [#/sec]
Time per request:       340.7 [ms] (mean)
Time per request:       68.14 [ms] (mean, across all concurrent requests)

Percentage of the requests served within a certain time (ms)
  50%    312
  66%    312
  75%    328
  80%    344
  90%    625
  95%    625
  98%    641
  99%    641
 100%    641 (longest request)

# rb -c 20 -n 200 rtmp://localhost/delayed
Benchmarking rtmp://localhost/delayed (be patient).....done
Waiting for threads to stop.....done

Server Hostname:        localhost
Server Port:            1935

Application path:       delayed

Concurrency level:      20
Time taken for tests:   4.2030 seconds
Complete requests:      200
Failed requests:        0
Requests per second:    47.59 [#/sec]
Time per request:       420.3 [ms] (mean)
Time per request:       21.015 [ms] (mean, across all concurrent requests)

Percentage of the requests served within a certain time (ms)
  50%    359
  66%    406
  75%    422
  80%    437
  90%    515
  95%    657
  98%    687
  99%    719
 100%    733 (longest request)

# rb -c 40 -n 400 rtmp://localhost/delayed
Benchmarking rtmp://localhost/delayed (be patient).....done
Waiting for threads to stop.....done

Server Hostname:        localhost
Server Port:            1935

Application path:       delayed

Concurrency level:      40
Time taken for tests:   7.1250 seconds
Complete requests:      400
Failed requests:        0
Requests per second:    56.14 [#/sec]
Time per request:       712.5 [ms] (mean)
Time per request:       17.813 [ms] (mean, across all concurrent requests)

Percentage of the requests served within a certain time (ms)
  50%    656
  66%    717
  75%    734
  80%    765
  90%    828
  95%    890
  98%    922
  99%    984
 100%   1016 (longest request)
2007-03-30

Security with Red5 0.6

New tutorial online...

A new Red5 tutorial is available, describing the API that can be used to limit access to streams and/or shared objects. Please note that the current trunk or the soon to be released version 0.6rc3 is required to implement security handlers.

Read it in the Red5 tutorials area.

2007-03-07

Captcha protection online

No more spamming!?

Tonight I implemented a simple captcha solution for my CMS icoya OpenContent, that is active in the comments and in my (finally re-opened) guestbook. If you're interested, get the code from my repository - you can also find the source of my guestbook there.

Please visit my guestbook and leave a short note about how you liked your stay on my website!

2007-02-12

Red5 0.6rc2 released

Now with AMF3 support...

The Red5 Team is proud to announce the release of Red5 0.6rc2.

Major changes since 0.6rc1:

  • Support for AMF3
  • RTMP client mode to connect to other Red5 servers
  • Compilation with Java6 supported in addition to Java5
  • Deferred results
  • Paths to VOD files can be customized from serverside code
  • Access to streams can be limited
  • Stream classes can be customized through red5-common.xml

Read the complete release notes on the official Red5 homepage.

Quick downloads:

2006-11-14

New Red5 tutorial

Use custom directories for streams...

I just finished another tutorial that describes how custom directories can be used when recording and playing back streams with Red5. Read it in the Red5 tutorials area.

Older News »



If you can read this text, it means you are not experiencing the Plone design at its best. Plone makes heavy use of CSS, which means it is accessible to any internet browser, but the design needs a standards-compliant browser to look like we intended it. Just so you know ;)