I am playing with writing a server for handling basic IM type stuff between members of a website.

I have been reading a fair bit about multi vs single thread servers, and can't figure out which is the best approach when using QT. The examples that come with it show both!

1) A single event loop for everything
2) A couple of event loops (1 handle new connections, 1 Send Data, 1 Receive Data)
3) Spawn a new Thread for each client connecting.

My concerns with 1 and 2 would be that there could be delays while the thread is doing stuff. With 3 I am worried that the system would run out of resources quickly.. what is the typical max number of threads that can be open at one time?

Any one have a viewpoint on this?