Pregunta

How many clients can connect to TidTCPServer in same time ? I used Indy10 , DelphiXE2 and target os is windows server 2003.

Is there a better option Instead of Indy for delphi?

¿Fue útil?

Solución

By default, the MaxConnections is set to 0, so the number of active threads isn't checked by the Indy server before accepting another connection, but it mostly depends on what the clients are doing on the server. For example, if your server accepts a client connection and then calculates pie to a trillion digits within that client thread context, you'll get significantly fewer connections handled properly than if you are handing off the work to another process. Basically, your result will vary based directly on the tasks performed.

For a generic answer... if you override the default stack size allocated to each thread, you could have up to a few thousand connections in a 32-bit server application, but likely not much more than that. See: What's the maximum number of threads in Windows Server 2003? and http://www.deltics.co.nz/blog/?p=1330

Also check the ListenQueue property, set to 15 by default. Apparently the OS can increase it further on its own... I don't know the current Windows Server default listen queue, but I typically bump up the default amount quite a bit.

Bottom line - get to a thousand active threads/connections and you are likely going to hit a wall sooner rather than later.

Otros consejos

However many clients the OS can handle with available resources. Keep in mind that each connected client uses its own thread, so you have to factory in the process's default thread size.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top