dariopb / traefikServiceFabricPlugin

Traefik 2.x Service Fabric Provider Plugin
MIT License
8 stars 6 forks source link

All services get assigned the load balancer server(s) based on the the last SF service! #10

Closed Mahons closed 2 years ago

Mahons commented 3 years ago

I spotted that when you have multiple services registered on the SF cluster; the plugin sets the services loadbalancer based for all services based on the last service to be configured. Refer to image below:

image

I believe this is a pointer issue within the code and I'll push a PR to resolve it.

dariopb commented 2 years ago

Thanks, you are right, that happens because the reference. I've fixed that in the newer version for the rule generator I'm working on, that is not based on the Traefik custom plugin code, it basically generates a traefik file provider compatible rule file that can be monitored by Traefik to pick up the changes. It is here: https://github.com/dariopb/serviceFabricDiscoveryService (this is the fix e4b897a1a9). That version has several improvements: one is that it uses traefik kv way to parse rules, so you should be able to use any of the route/middlewareI/etc. rules (in the plugin one, the labels needs to be defined explicitly for anything that needs to be supported), it also exposes the rule stream over a ws stream, so you can have only one process that interfaces with the cluster and multiple proxy servers getting data from it (that helps to scale and not to overwhelm the cluster).

Mahons commented 2 years ago

Thanks @dariopb. I like the sound of that file provider service. I'll have a look at that tomorrow when I get a chance.