AppFabric 缓存连接类型和协议
AppFabric 缓存 API(本地,而不是 Azure)是否使用 WCF 作为其通信机制?我们将 AppFabric 集成到一个非常大容量的 Web 应用程序中,并在某些 WCF 调用中发现了大量瓶颈。探查器使这些看起来像是来自我们的缓存库,但它们都是非常低级的系统调用,所以我们很好奇……
appfabric 缓存是否通过一组直接的 TCP 访问套接字连接?或者它们是分层在其之上的一些更高级别的协议/设计? Appfabric 比其他提供商(如 memcached)有很多优势,但如果大容量系统上的协议开销如此之大,我们担心它可能会导致问题。
谢谢!
Does the AppFabric cache API (local, not Azure) use WCF as its communications mechanism? We are integrated AppFabric into a very high volume web application and seeing a ton of bottlenecks in some WCF calls. The profiler makes it seem like these are coming from our cache library, but they are all very low level system calls, so we are curious..
is appfabric cache accessed via a set of straight up set of TCP sockets connections? or are they some higher level protocols/designs that are layered on top of it? Appfabric has a lot of benefits beyond other providers (like memcached), but if there protocol overhead is so much on a high-volume system, we are worried it may cause problems.
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,它在幕后使用了 WCF。更具体地说,它在 tcp 传输上使用二进制消息编码,所有这些都具有自定义配置设置,我确信 AppFabric 缓存团队在经过大量负载测试场景后选择了这些设置。它还默认启用安全性(传输和消息签名/加密),这肯定会增加一些 CPU 开销。如果您确定网络设计是安全的,则可以禁用它们。
安全性往往会增加大量开销,如果您为缓存集群/客户端应用程序提供了安全的环境,则应该尝试消除它。 查看此 MSDN 页面上标题为“安全设置”的部分了解更多信息有关如何配置客户端的详细信息。 另请查看此 MSDN 页面上标题为“群集配置存储位置设置”的部分 有关如何在主机上配置安全性的详细信息(注意:您可以使用
Set-CacheClusterSecurity
PowerShell 命令轻松设置这些内容)。Yes it uses WCF under the covers. More specifically it uses binary message encoding over the tcp transport all with custom configured settings which I'm sure were selected by the AppFabric caching team after tons of load testing scenarios. It also has security enabled by default (transport and message signature/encryption) which will definitely add some CPU overhead. You can disable these if you're sure you're network design is secure.
Security tends to add a lot of overhead and, if you've provided a secure environment for your cache cluster/client apps, you should try to do away with it. Check out the section titled "Security Settings" on this MSDN page for more details on how to configure the client. Also check out the section titled "Cluster Configuration Storage Location Settings" on this MSDN page for details on how to configure security on the host (note: you can set these easily with the
Set-CacheClusterSecurity
PowerShell command).AppFabric的分布式缓存和本地缓存方面使用WCF,是的。你用的是perfmon吗? WCF 和 AppFabric Cache 都提供性能监视器计数器,可以让您准确地确定这一点。如果您使用本地缓存,您是否使用通知?这当然会增加闲聊。
访问缓存时,是否进行了大量锁定?根据我的经验,这似乎会极大地降低 AppFabric 缓存的性能。
此外,Windows 安全以及 Sign 或 EncryptAndSign 保护也会招致相当大的处罚。
AppFabric's distributed cache and local cache aspects use WCF, yes. Are you using perfmon? WCF and AppFabric Cache both offer perfmon counters that should let you pin this down precisely. And if you're using local cache, are you using notifications? That of course would increase chattiness.
When accessing the cache, are you doing a lot of locking? That seems to degrade AppFabric Cache performance greatly in my experience.
Also, Windows security, and Sign or EncryptAndSign protection, incur sizable penalties as well.
完全同意德鲁的说法。
我认为通信部分已经针对性能进行了优化,因此不应成为瓶颈。
您可能还想查看有关 Windows Server AppFabric 缓存性能的案例研究 http ://www.griddynamics.com/images/files/af_cache_benchmarking_1.4.pdf
Totally agree with what Drew said.
I would like to think the communication part is already optimized for performance and should not be a bottleneck as such.
You may also want to take a look at this case study for Windows Server AppFabric's caching performance http://www.griddynamics.com/images/files/af_cache_benchmarking_1.4.pdf