Hi Aleksej, We are currently continuing down the path of switching the NHibernate repositories on the fly, and are in the middle of testing. Will update this thread when we finally push our build to production.
We also found one issue on our side, where a firewall between the Application servers and the Caching servers was resetting connections due to which we were getting more caching failovers. So bringing the Caching servers into the same VLAN as the Application servers has greatly reduced our problems. The distributed caching solution does make a significant difference in our case as our Application is content driven, and the content does not change frequently. For the frequently changing data we have to ensure that we clear the cache as soon as possible, in fact we use a queue based system for clearing the cache, so that in case of failure the message with the clear call remains in the queue until it succeeds. regards, Gautam On Friday, November 16, 2012 3:51:58 AM UTC+5:30, Aleksej Milorava wrote: > > Hi, > > I'm quite interested on the outcome of this, as my team is soon > approaching the stage in the project where we were thinking to install the > distributed caching solution. > > Gautam, did the you solve the issues? > Is the distributed caching solution really making a difference to querying > the database directly, or maybe it would make sense to increase the DB > server productivity (whatever would that be network or CPU, etc.)? > > Kind regards, > Aleksey > > > On Tuesday, 6 November 2012 08:56:50 UTC, Gautam Gupta wrote: >> >> Hi, >> >> Our scenario is such that - for our central web services, we are >> currently using a distributed caching solution with our NHibernate >> implementation for the 2nd Level Cache. >> >> Sometimes, our caching server goes down, due which we get an NHibernate >> exception in our web service, based on which we do the following: >> 1. If its a caching server related exception, we go into failover mode >> and rebuild our NHibernate Session Factory without 2nd Level Caching support >> 2. Throw an unrecoverable exception to the client of our web service >> >> When traffic is high, we get a number of such exceptions on our web >> service client. >> >> Going forward we want to ensure that no exception gets thrown to the >> client, so we are thinking about doing the following: >> 1. Keep 2 instances of the NHibernate Session Factory - One with 2nd >> Level Cache support and one without. >> 2. On a Caching server exception, retry the request by using the Factory >> without the 2nd Level Cache support, until the Caching server comes back >> online, and then resume using the factory with 2nd level Cache support >> >> So, basically we would be switching between both the NHibernate Session >> Factories on the fly. >> >> Would be great if somebody could: >> 1. Give any pointers on handling the failover of NHibernate's 2nd Level >> Cache >> 2. Point out any pitfalls of switching the Session Factories on the fly >> >> Thanks. >> > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/7fUIY0mAhloJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
