LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-19-2011, 01:15 PM   #1
darshan82
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Rep: Reputation: 0
Question one-to-one server VS one-to-many server


Hi,

I am actually writing a single SCTP server which needs to handle thousands of clients pumping msgs at various rates. I am thinking of below options to make the server multi-threaded. Please provide some inputs.

1. Make SCTP server socket a one-to-many styled (SOCK_SEQPACKET). Since all clients connect to same socket, I can remove the overhead of select/epoll and I can have multiple threads to read from the same global socket. Actually can different threads read from the same socket ? (No syncronization in sctp_recvmsg() ?)

2. Make SCTP server socket a one-to-one styled, where the accept returns individual sockets to be read for each client. If I choose to multithread the server, then creating 1000 threads for 1000 clients is not feasible. So I should have a thread pool where each thread handles a bundle of client fds. But is this not a bad design when it comes to performance? Isn't the former approach better one ?

But I read that a one-to-one server is always a better and used everywhere. But logically for me it looks like a one-to-many server best suites my requirement. Please enlighten me.

Thanks,
Darshan
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Server configuration for small office server, which smtp, pop imap server and backup whitelinux Linux - Server 4 04-06-2010 11:26 AM
How to monitor web server, FTP server, Mail server and database server vodka33us Programming 1 06-16-2008 04:20 AM
How the DNS-server is connected to work of a web-server and a mail-server? ukrainet Linux - Newbie 2 01-10-2005 09:18 PM
can we configure a Linux server with mail server,file server and web server kumarx Linux - Newbie 5 09-09-2004 06:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration