Flagsmith / edge-proxy

The Flagsmith Edge Proxy Docker Image
3 stars 3 forks source link

Health Check should not return unhealthy if environment data is out of date #120

Open matthewelwell opened 2 months ago

matthewelwell commented 2 months ago

The issue:

When using the health check endpoint, The Edge Proxy is not currently able to withstand faults on the Flagsmith API due to the health check returning unhealthy if the environment data has not been updated in a defined period of time (as per the logic here).

Additional Considerations:

Since (currently) each edge proxy instance maintains its own cache of the environment data, we ideally want to know when a single instance no longer has an updated cache of the environment, but not when all instances are unable to update (because then it's likely that the Flagsmith API is down and we want the Edge Proxy to add as a cache). This may not be possible without a centralised cache.

matthewelwell commented 2 months ago

Current proposed solution is to make the timeout configurable in length, and even provide the ability to disable this timeout entirely, but we should probably consider how we return warning information that the cache is out of date.