>> I've been reading through the mail archieves and would like to know
>> if there are any tips / example code for creating a TCP server that
>> can handle high (5000+) simultaneous connections. It seems the
>> method to assign upto 500 connections per thread seems to be the
>> best method. Is there an example of how to develop the server so
>> that a connection can be assigned to a certain thread.
> Not yet, but you are not the first to ask. The problem is ICS is written
> and supported by volunteers, and unless those volunteers have new
> projects that need new features, there needs to be an incentive for the
> time needed to be allocated.
>> My application is a server that will handle connections from many
>> thousands on devices sending an XML stream (around 5 - 100k in
>> size) at set intervals. This XML is stored to a DB for processing
>> at a later date. It is likely that in the future there will be many
>> thousands of these devices sending information.
> Are you planning on writing thousands of streams to the database
> simultaneously in real time, or is thousands of open and idle connections
> sending XML once a minute, or once an hour or something?
> Is this two way so the originator gets a response from the database, or
> one-way so data is simply collected and can be queued before being
Potentially there will be 1000's of streams opening, sending data and then
> Writing to a database is intensive, using ADO I believe each connection
> uses it's own thread, so you can end up with thousands of threads running
> on the server, in addition to your own threads.
The data will be written to DB (file could be used if better performance) and
confirmation sent back to the client indicating everything was stored correctly.
> If you are only collecting data, you may want to look at my ComCap
> application, which uses ICS to handle up to 400 streams using a single
> thread, and will parse and write data from those streams to a SQL
> database. It has been tested with 250 streams being written to files
> (created by the related ComGen tool) but not 250 database connections!
Another possibility is to have multiple servers listening on different ports.
If each server
ran on a seperate thread would this increase load handling? The only problems
is that all connections
would be incoming to the same port so I'd need to redirect traffic from port x
to the servers on port y / z
depending on which server had enough free load. Is this something that is
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be