cjard
Well-known member
- Joined
- Apr 25, 2006
- Messages
- 7,081
- Programming Experience
- 10+
Hello All
I'm looking for some articles on implementing high performance server applications in .NET and the various techniques for dealing with connections and sending/receiving data.
The server is simple request/response like HTTP. The last time I wrote some network heavy apps, I managed all the threading myself, making two new threads to work on the reading from andd writing to the socket, then placed them in the threadpool to be run. Performance was surprisingly bad, with one bittorrent client on another machine initiating enough low-volume connections to cause massive CPU usage.
Upon switching to Asynchronous style IO, the CPU usage dropped dramatically.
It is recommendations of this sort that I seek
For now, I will probably implement this in the same style as I did before. A main loop runs to accept connections (this will be a windows service):
Other questions:
Socket or TcpClient? Do we care?
I dont think this server will be hit with much traffic, probably less than 10 requests per second, but it would be nice to not have to take it offlien to patch stuff up later..
I'm looking for some articles on implementing high performance server applications in .NET and the various techniques for dealing with connections and sending/receiving data.
The server is simple request/response like HTTP. The last time I wrote some network heavy apps, I managed all the threading myself, making two new threads to work on the reading from andd writing to the socket, then placed them in the threadpool to be run. Performance was surprisingly bad, with one bittorrent client on another machine initiating enough low-volume connections to cause massive CPU usage.
Upon switching to Asynchronous style IO, the CPU usage dropped dramatically.
It is recommendations of this sort that I seek
For now, I will probably implement this in the same style as I did before. A main loop runs to accept connections (this will be a windows service):
VB.NET:
While True
tcpc As TcpClient = myTcpListener.AcceptTcpCLient()
tcpc.BeginRead(...delegated call..)
End WHile
Other questions:
Socket or TcpClient? Do we care?
I dont think this server will be hit with much traffic, probably less than 10 requests per second, but it would be nice to not have to take it offlien to patch stuff up later..