google / exposure-notifications-verification-server

Verification component for COVID-19 Exposure Notifications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow programmatic check for maintenance mode for server, apiserver, adminapi

bschlaman opened this issue · comments

TL;DR

Want to implement a way to check if server / apiserver / adminapi are in maintenance mode without having to issue codes or cause 4XX errors.

Design

Proposal
My first thought is to either use a response header like x-maintenance-mode: true|false or include it as a boolean key value pair at the /health endpoint, i.e. {"status":"ok", "maintenance-mode":true|false}

Alternatives considered
This is technically possible by simply hitting one of the existing APIs like /verify with API key authentication; however, this is not ideal as you either would have to issue and verify real codes or generate a 4XX error AFAIA. I also don't know of a good way to do this for the server service.

I'm ok w/ the /health approach

This seems fine to me. I would suggest naming the field with underscores instead of dashes though.