如何通过其前面的AppGateway和负载均衡器(AppGw-> LB-> SF节点)实现对Service Fabric节点的粘性? [英] How to achieve stickiness to a Service Fabric node with AppGateway and Load Balancer in front of it (AppGw -> LB -> SF nodes)?

查看:123
本文介绍了如何通过其前面的AppGateway和负载均衡器(AppGw-> LB-> SF节点)实现对Service Fabric节点的粘性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

借助LB会话持久性,我们可以粘在SF节点上,但是基于AppGw IP地址, 或更少总是相同的,因此所有请求最终都在同一个SF节点上(即,我们现在很粘,但仅使用单个SF节点).

通过该设置,我们可以使用基于Cookie的亲和力来实现均匀分布,但也可以保持对 SF节点.如果没有LB,我们是否会失去一些东西?

解决方案

您应该能够用应用程序网关替换LB.没有开箱即用的选项来选择应用程序网关.因此,您将必须通过ARM模板进行部署,并替换负载平衡器的所有实例. 使用应用程序网关. 

另一些​​人也提出了类似的问题

https://github.com/Azure/service-fabric-issues/issues/865

https://stackoverflow.com/questions/40632642/azure-service-fabric-with-applicationgateway

https://stackoverflow.com/questions/40339046/azure-application-gateway-with-服务面料

上面的GitHub示例也收到了Service Fabric产品所有者之一的回应.从本质上说,它可以使它正常工作,但会花费更多的精力.


We currently have 1x AppGw -> 1x LB -> 3x SF Nodes and we want "stickiness" to one of the SF nodes.

With AppGw cookie based affinity we only get stickiness to the (singleton) LB (i.e. does not achieve what we want).

With LB session persistence we get stickiness to a SF node but based on the AppGw IP address, which is more or less always the same, thus all requests end up at the same SF node (i.e. we are sticky now, but only use a single SF node).

It seems to me that the only solution would be to get rid of the LB and add the SF nodes to the backend pool of the AppGw directly, e.g. 1x AppGw -> 3x SF nodes.

With that setup we could use cookie based affinity to achieve an even distribution but also stickiness to the SF nodes. Is there something that we would lose not having the LB inbetween anymore? Autoscaling of SF nodes maybe?



解决方案

You should be able to replace the LB with an application Gateway.  Downside is there is not an option out of the box to pick an app gateway. So you would have to deploy via ARM template and replace any instances of a load balancer with an app gateway. 

Some others have asked similar questions 

https://github.com/Azure/service-fabric-issues/issues/865

https://stackoverflow.com/questions/40632642/azure-service-fabric-with-applicationgateway

https://stackoverflow.com/questions/40339046/azure-application-gateway-with-service-fabric

The GitHub example above has a response from one of the Service Fabric Product owners as well. Essentially it states you can make it work but would take a bit more effort. 


这篇关于如何通过其前面的AppGateway和负载均衡器(AppGw-> LB-> SF节点)实现对Service Fabric节点的粘性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆