简体   繁体   中英

WCF Client scalability advice

I've got a multithreaded application that calls the same service 200,000+ times per day. Currently it instantiates a new ClientBase auto-generated proxy for each call.

What can I do to boost performance? Instantiate one client and share it? Should I investigate an async client, and if so, can that be shared?

What is the nature of your service operations? One-way operations can be easily switched to async with minimum efforts. Especially using TPL (from Async methods family).

Also usually object instantiation is cheap. Just make sure that it doesn't have a heavy constructor. And minimize a number of members to make a type to be constructed as lightweight as possible. This is not a good point for optimization.

You need probably to optimize service calls, data types (de)serialized during them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM