【问题标题】:Service Fabric - multiple services with same endpointService Fabric - 具有相同端点的多个服务
【发布时间】:2017-10-21 21:57:16
【问题描述】:

有没有办法让同一个集群中的多个不同的 SF 服务监听同一个端点 http 80?服务的 WebAPI 具有不同的路由。

<Endpoint Protocol="http" Name="ServiceEndpoint" Type="Input" Port="80" />

我收到一个错误:

无法绑定到地址http://[::]:80:地址已在使用中。

有没有办法避免这种情况?

【问题讨论】:

  • 放置约束或使用允许多个绑定的东西(Windows 上的 httpsys)

标签: http asp.net-core azure-service-fabric asp.net-core-webapi endpoint


【解决方案1】:

如果你想使用相同的IP,那么你必须使用端口共享,即windows中的http.sys More info here

如果您有不同的 IP 地址,那么您可以为每个服务分配唯一的 IP 地址。 More info here

否则使用反向代理,以便所有服务具有相同的端口,并指定路径。

希望对你有帮助

【讨论】:

  • 非常有用!谢谢。
猜你喜欢
  • 2016-08-27
  • 1970-01-01
  • 2017-12-19
  • 1970-01-01
  • 2016-03-13
  • 2017-06-23
  • 2018-09-18
  • 2012-03-22
  • 2018-04-05
相关资源
最近更新 更多