|
Hi
Stephen,
What
you experience is normal. It is no easy answer.
What I
suggest you is simply do not have long idle connections to your server. Once
client gets data, either TCP server/client disconnect the connection. Thus
you will not have lots of client connections to server. The bad side is your
client will have to reconnect to your server each time which waste
some bandwidth and slow down a little, i.e. three way hand shake for TCP.
Anyway it is better than frozen your server.
I am
not suggesting that is the only way, but it is the easiest way for you right
now. The complete solution is follow zeus web server design www.zeus.com which I assume that you can't
afford.
Regards
Leigh
Wanstead
-----Original Message----- From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf
Of Stephen Bertram Sent: Friday, May 28, 2004 10:49
AM To: NZ Borland Developers Group - Delphi List Subject:
[DUG] Indy question
Hi
all
We
have a server application using TIdTCPServer, Currently each client
connection spawns a new thread and that thread manages client requests based
on a Readln in the Execute loop.
We
are having real performance issues when we have more than 2000 client
connections, largely due I suspect to thread management. I
understand thatt in the Unix environment a number of client connections can
semaphore to a single connection management thread and can be serviced in an
orderly fashion.
Can
Indy be configured easily to operate in this fashion?
I know that I could poll
all connections in a loop, but the list management of the connections to be
polled, connection and disconnection handling and the polling itself are all
fairly heavy duty items.
I
can't see anyway of raising a semaphore on a socket without having a thread
bound to that socket.
Any
thoughts would be welcome.
Stephen
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This communication contains information that is confidential and the
copyright of ensynergy Limited or a third party.
If you are not the
intended recipient of this communication please delete and destroy all copies
and telephone ensynergy Limited on +64 9 3551591 immediately. If you are the
intended recipient of this communication you should not copy, disclose or
distribute this communication without the authority of ensynergy Limited.
Any views expressed in this communication are those of the individual
sender, except where the sender specifically states them to be the views of
ensynergy Limited.
Except as required by law, ensynergy Limited does
not represent, warrant and/or guarantee that the integrity of this
communication has been maintained nor that the communication is free of
errors, virus, interception or interference.
|
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi