HealthCheck Middleware

HealthCheck Middleware provides <SERVER>:<PORT>/healthcheck endpoint. This endpoint behaves similar way as it does in Swift[1]. Normal operations returns 200 OK and if config option disable_path is enabled and that path exists it will return 503 DISABLED BY FILE.

Problem description

Currently Glance does not have any reasonable means to provide health check information for example to HAProxy. Any such deployment causes extensive logging and causes unnecessary operations in the server end (FE. GET request to / which leads to version check).

Proposed change

Take advantage of oslo.middleware‘s healthcheck middleware by:

  1. Adding a new paste filter - healthcheck

  2. Adding the new filter to the default Glance API and Registry pipelines

Disabled functionality would allow using a file in the filesystem to return 503 DISABLED BY FILE response dropping the node from the HAProxy. This would allow the nodes disabled to finish their current operations and improve maintenance experience in HA deployments.


Current operations model.

Take Swift’s slightly smaller implementation and copy it directly into Glance’s source tree.

Data model impact


REST API impact

GET ‘/healthcheck’ 200 OK, 503 DISABLED BY FILE

Security impact


Notifications impact


Other end user impact


Performance Impact

Potential performance improvement as healthcheck is done quite frequently and the middleware is lightweight filter at the start of the pipeline.

Other deployer impact

healthcheck would be added to the start of the used pipeline to be used. Optional disable_path=PATH option would be needed to the config files to enable the discreet disable functionality.

Developer impact




Primary assignee:

jokke kamil-rykowski

Core Reviewers:

kragniz flaper87 icordasc

Work Items

Code Change Tests Config Change Documentation Change




Simple functional tests to verify the responses form the <SRV>:<P>/healthcheck

Documentation Impact

Documentation changes are quite minimal explaining the new config option and functionality.


[1] _