Question

I try to make rtsp server in linux, I consider that server choice single or multiple thread automatically.

As you know, RTSP has lots of data packets between server and client. (video, music like real-time data)

So, I think epolling is not good choice. Because events occured every time in this case.

Besides, I heard it is not good that one socket per one thread. Due to the same reason, this is not good choice too.

I saw sample codes about that, no one make epolling or multi socket in one thread. (It may be just sample code)

Is it right? rtsp server using epolling is no meaningless?

Was it helpful?

Solution

It depends on many things, such as how many total clients you need to serve? If you are doing a home server and going to serve max 10 clients simultaneously, you will be better using one thread per client. With 50 clients it may still be the case, although poll is more likely a better choice. With 10,000 clients you'd probably be better using epoll in edge triggering mode.

I've just posted an article comparing different polling methods: http://www.ulduzsoft.com/2014/01/select-poll-epoll-practical-difference-for-system-architects/ - check it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top