简体   繁体   中英

Service Fabric TCP Reverse Proxy

Is it possible to use the built in Service Fabric reverse proxy to balance between nodes over TCP? I have a TCP server setup within service fabric that I can telnet into but I can't go over port 19081 (reverse proxy address).

No. But you could setup the Azure Load Balancer to do that. The downside vs SF reverse proxy is that ALB is not aware of placement of services on nodes so the use case here is where you make the service available on all nodes on the same port.

It would have been nice if SF Reverse Proxy service had TCP level forwarding like kube-proxy.

I guess it would be possible to write your own TCP relaying Service (using for instance WcfCommunicationListener and a NetTCPBinding ) that connects to the downstream services. https://github.com/spoorendonk/service-fabric-reverse-proxy is a standalone implementation of the HTTP reverse proxy (originally intended for on-premise development clusters), you could base your TCP variant of reverse proxy of of that one.

If you want your service to be aware of where downstream services are placed (in terms of nodes and partitions) you could use the Fabric.ServiceManagementClient and register for notifications using on of the RegisterServicePartitionResolutionChangeHandler methods. This notifies you whenever a service replica or partition is changed with an instance of ServiceNotification .

To answer your question, no, but you could potentially build it yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM