microsoft / service-fabric-aspnetcore

This repo contains ASP.NET Core integration for Service Fabric Reliable Services.
Other
153 stars 50 forks source link

Reverse Proxy with readiness probe #100

Open levimatheri opened 2 years ago

levimatheri commented 2 years ago

Describe the bug I came across the readiness probes, which work fine. However, when the endpoint address is unpublished when the instance is unhealthy, the reverse Proxy still tries to route requests to the endpoint, and since there is no address published, it returns 400 FABRIC_E_INVALID_ADDRESS.

To Reproduce Set up a readiness probe as described in the article referenced above. I have configured IHealthCheck from ASP.NET with simple logic to report healthy/unhealthy at random intervals, and mapped an endpoint to this health check to be called by the readiness HTTP probe.

Expected behavior The reverse Proxy should not try an instance with unpublished endpoints, and should retry another instance.