Search code examples
azuretraefikazure-service-fabricazure-load-balancer

Azure Service Fabric with Træfik - with Azure LB?


I’m considering integrating Træfik in my Azure Service Fabric cluster.

After reading all documentation available for this combination, I couldn’t find anything addressing the Azure LB.

It seems to me that Azure LB is redundant as Traefik would take care of balancing the load across the cluster’s nodes. However, I recall that, technically no request would ever reach the cluster before the Azure LB successfully probes the configured endpoint.

So, do I really need Azure LB when using Træfik?

What configuration I need to make on the Azure LB, if at all?


Solution

  • Traefik runs as a guest executable on your Service Fabric cluster and acts as a reverse proxy. In Azure, the Service Fabric cluster is deployed inside a VNET and thus Traefik cannot be used as the Azure Load Balancer. While it does take care of balancing load internally across the cluster nodes, you will still need an Azure Load Balancer that acts as the bridge between the public internet and your cluster. Hope that helps!

    Edit: I just noticed I didn't answer your second question. The only configuration you would have to make on the Azure LB is to open the port's on it that Traefik is listening to on the cluster. In other words, the ports you set in the toml file, you will need to configure the Azure Load Balancer to open. To open an Azure Load Balancer port you can do it at deployment time or you can also change this once the cluster is up.