在多服务器环境中使用 Syscache 作为 nhibernate 二级缓存是否存在任何问题?
我刚刚从单个 Web 服务器环境迁移到多 Web 服务器环境,并且过去一直使用 nhibernate 和 syscache 二级缓存。
我知道我需要迁移到分布式 nhibernate 二级缓存解决方案(memcache、velocity 等),但是(由于多种原因),它需要一些时间来进行迁移。
对于我当前的状态(目前在多网络服务器环境中使用 Syscache 2 级缓存),有什么特别需要担心的吗?还是它的性能不如分布式解决方案(假设我基本上会拥有每个网络服务器上的本地并行缓存与跨服务器的集中式缓存)。
我基本上想弄清楚这个设置是否有任何问题,或者它只是没有那么快。
i have just migrated from a single web server environment to a multiwebserver environment and i have been using nhibernate and the syscache 2nd level cache in the past.
I know i need to move to a distributed nhibernate 2nd level caching solution (memcache, velocity, etc) but (for a bunch of reasons), its going to take a little time to do that migration.
Is there anything in particular that i need to worry about with my current state (of using Syscache level 2 cache in a multi webserver environment for now) or is it just not going to be as performant as a distributed solution (given i will essentially have local parallel caches on each webserver versus a centralized cache across servers).
I am basically trying to figure out if this are any problems with this setup or its just not as fast as it could be.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在网络场环境中,建议使用分布式缓存,否则每个网络服务器都有自己的缓存副本,这可能会降低效率。
Syscache
使用默认的 ASP.NET 缓存提供程序,因此它的执行速度与默认的 ASP.NET 缓存一样快。默认情况下,它存储在每个 Web 服务器的内存中。因此,使用默认 ASP.NET 缓存的 SysCache 将在网络场环境中工作,但如果您使用分布式缓存,则效率不高。
In a web farm environment it is recommended to use a distributed cache or each web server will have its own copy of the cache which could be less efficient.
Syscache
uses the the default ASP.NET cache provider so it will perform as fast as this default ASP.NET cache. By default it is stored in memory of each web server.So SysCache using the default ASP.NET cache will work in a web farm environment but will not be as efficient if you used a distributed cache.