Is WCF Durable Services the right choice?

前端 未结 1 1992
[愿得一人]
[愿得一人] 2021-01-23 21:05

We are in the process of selecting the best method for saving state between WCF sessions/calls. We have found that WCF DurableService suits our needs.

We would like to k

相关标签:
1条回答
  • 2021-01-23 21:31

    DurableService uses built-in WCF features to communicate the state (module-level variables) to the client using either the BasicHttpContextBinding or the WSHttpContextBinding. The persistence mechanism depends on either HTTP cookies on the client or soap headers for storing the serialized data between calls. Your average soap message size would be 100KB plus whatever payload the operation parameters hold on each call. You also have to design CanCreateInstance and CompleteInstance semantics into your operations contracts and application logic to properly remove the session payload.

    DurableService most likely isn't going to be very performant given your scenario of 1000+ concurrent session and 100KB of session data. By default, WCF services that enable session of any kind are limited to 16 concurrent sessions. You can increase that number but I doubt you'll be able to handle 1000+ sessions on a single server instance. For that many sessions you'll likely need to use either a hardware or software based load balancer for multiple host servers which makes maintaining session iffy in production even with so-called session affinity support. I'd recommend using a stateless per call service design and make the application code responsible for managing state.

    0 讨论(0)
提交回复
热议问题