In case when there are many connections to the IIS7 that are most of the time idle creating a thread for every connection could be expensive.
Imagine an example 1000 connections (or more) that are sending 100 bytes every 10 seconds for few hours (PUT in chunks). The read process is done like this:
void ReadData(HttpWorkerRequest wr)
int chunkBytes = wr.ReadEntityBody(buffer, buffer.Length);
// check for the end of transmission
// process data
Execution of ReadEntityBody is blocking so the thread is going idle while waiting for data. Is any way to avoid this problem? May be it's possible to check if anything is in the buffer before calling the method or it is possible to get a call back when data is ready? Other idea?
Any help would be appreciated.
View Complete Post