Multithreading over a network in C#.

This is probably a simple one but I wanted to get some clarity:

I need to access about 300 servers  over a 10G network and grab info from them. Once completed I need to merge all the info together and display it.

Ideally I would like to use Multithreading (in C#) to do this quickly so that would mean handling all the different thread info and merging it together once the threads are completed. I see different methods and was wondering based on everyone's experience what is the best method for multithreading over a network.

I understand of course that wildcards such as router hops and server speed can cause the time of completion to fluctuate. At this point I am just focused on making sure my MT code is correct and optimized.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

käµfm³d 👽Commented:
Threading is for CPU-bound computing. The CPU isn't going to make your network move any faster. What you probably want instead is asynchronous computing, which is I/O bound, and will allow your code to continue processing whilst waiting on responses from the network. Look into the async/await options that the newest versions of the Framework provide.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
If you have deep access to the servers, you might want to think a bit about "Remoting", too ... instead of fetching big amounts of data over the network and crunch them locally, you could do the crunching remotely on the servers (ansynchronous, sure ...) and fetch only the processed results for merging them locally. That would optimize either processing time, network load and overall network volume.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.