0

I'm developing as system with a WCF service back end, and thinking about implementing sessions. But I'm worried about the number of client that can be connected at the same time. I will have up to 500 clients connected, and each client will constantly make calls every 5-10 seconds. How expensive will it be for the service to have one instance per client?

Thanks

Jon

  • I think that would depend on the hardware you're running on, at least to some degree. Why not assign each client a unique id for their lifetime, and use that unique id as a key for whatever information you're storing - that way each service host instance has one object to store data in for all of its clients. – Tim Aug 23 '11 at 06:44
  • @Tim: Essentially the [Flyweight Pattern](http://en.wikipedia.org/wiki/Flyweight_pattern). – Christian.K Aug 23 '11 at 07:52
  • @Christian.K - I've never heard of that pattern, but it would seem to fit (at least what I was trying to describe). Thanks for the info - it's always a good day when I learn something new :) – Tim Aug 23 '11 at 07:54
  • Unless you have super compelling reason I would strongly suggest not to use WCF sessions. Using sessions will not allow your service to scale easily. Maintain the session in a DB or distributed caching service. The answer to your question is to performance test your service. The memory usage would depend on how much you are storing in your session and the session timeout. – softveda Aug 23 '11 at 11:14

1 Answers1

-1

The Enterprise Library caching and authentication blocks may be used in this scenario. Your infrastructure servers will need high specification SQL and Application machines.