google / exposure-notifications-server

Exposure Notification Reference Server | Covid-19 Exposure Notifications
https://www.google.com/covid19/exposurenotifications/
Apache License 2.0
2.45k stars 313 forks source link

Health Check Cache #1579

Closed jklaw90 closed 2 years ago

jklaw90 commented 2 years ago

Fixes

If we have a failure threshold greater than 1, this would never be marked unhealthy. It would return one unhealthy, and then healthy until the next dbPingLimiter.Allow and so on.

Proposed Changes

Release Note

cache health check status
sethvargo commented 2 years ago

I think I'd rather return 429 instead of a cached result. There's no reason anyone should be hitting this endpoint more than 1/s.

jklaw90 commented 2 years ago

I was thinking in the case of liveness and readiness probes in k8s, there may be multiple probes calling this endpoint? So no one probe would hit it more than 1/s, but the multiple probes would causing possibly unknown behavior. If it's not needed i can close it out.