SignalR与服务织物无状态的Web API

编程入门 行业动态 更新时间:2024-10-27 06:26:16
本文介绍了SignalR与服务织物无状态的Web API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

得到此相关的问题的一些信息:Using SignalR与Azure的服务面料

Got some info from this related question: Using SignalR with Azure Service Fabric

在报价从历史评论报价:部署该应用程序后,你可以看到一些调用signalR失败,有些成功......

Quote in quote from that comment history: "After deploying this application, you can see that some calls to signalR fails and Some succeeds...."

只是想知道是否有人有类似的实现(signalR使用Web API ...)。而且我不希望设置实例计数1的无状态的Web API。

Just want to know if anybody had similar implementation (signalR with Web API...). And I don't want to set instance count 1 for the stateless Web API.

推荐答案

您可以配置所使用的服务布料坚持会话负载平衡器。这将导致在特定的客户端在同一节点总是结束了。

You can configure LoadBalancer that is used by Service Fabric to persist session. This will result in particular client ending up always in the same node.

您可以通过访问蔚蓝门户分配到服务织物集群负载平衡器做到这一点。然后进入负载平衡规则中,选择规则,负责signalR端口,设置会话持久化到客户端IP。这也可以从PowerShell的或ARM模板进行。

You can do it by accessing LoadBalancer assigned to service fabric cluster in azure portal. Then go to "Load balancing rules", select rule that is responsible for signalR port and set "Session persistence" to "Client IP". This can also be done from PowerShell or ARM template.

更多推荐

SignalR与服务织物无状态的Web API

本文发布于:2023-11-09 03:15:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1571246.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:织物   状态   SignalR   Web   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!