rem
rem

Reputation: 17065

InstanceContextMode PerSession with a new proxy on each call

Will the performance of a WCF service be the same in the following two cases?

  1. InstanceContextMode set to PerCall
  2. InstanceContextMode set to PerSession, and all clients create a new proxy for each call of a service method with closing the proxy after the call (so we have separate session for each call). There are no concurrent calls from one client.

All throttling parameters are set to its defaults. The binding used - netTcp.

Upvotes: 1

Views: 116

Answers (1)

ErnieL
ErnieL

Reputation: 5801

There are small differences on in how WCF handles the calls. Use of sessions will hit you most in the scalabily of very high volume applications. PerCall scales better than the other models.

The real question is whether the differences will be detectable in your particular use case. Only you you can answer that with a benchmark.

Upvotes: 1

Related Questions