Our current project at work is the new MVC website that will use the WCF service, primarily to access third-party billing systems through the web service, as well as a small SQL database to personalize users. The WCF service uses nHibernate for an SQL database.
We would like to implement some kind of web farm for load balancing, as well as recovery and maintenance. I am trying to solve the best way to handle caching of nHibernate and concurrency database if there are multiple WCF services.
Some scenarios I was thinking about ...
1) Several IIS servers, one WCF server. With this setting, the WCF server will be the only point of failure, but there will be no problems with caching nHibernate or the concurrency database.
2) Several IIS servers, each of which has its own WCF service. This removes one point of failure, but now nHibernate on one machine will not be aware of database changes made by another machine.
Some solutions for number 2 will use IStatelessSession, so we do not cache, and nHibernate is always fetched directly from the database. This may be the most feasible, since our personalization database contains very few objects. I also consider second-level cache, such as memcached or Velocity, but it might be redundant for this system.
I talk about this to find out if anyone has experience with this kind of architecture and get some ideas for a solution. Thanks!
source share