-
Notifications
You must be signed in to change notification settings - Fork 28
[maintenance] diagnose long response latency #1421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[maintenance] diagnose long response latency #1421
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1421 +/- ##
=========================================
Coverage ? 71.44%
=========================================
Files ? 240
Lines ? 9512
Branches ? 1044
=========================================
Hits ? 6796
Misses ? 2412
Partials ? 304
Continue to review full report at Codecov.
|
30f5e89
to
b76fb44
Compare
Removed monitoring_enabled option
ensures check does not raise exception when no middlewares in place added log failure as optional
_is_prod resolved at factory context
Reuses /v0/ as a simple check-run
No need for WEB_SERVER prefix since they do not collide
bdbeb84
to
96fdc6a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect!
What do these changes do?
Monitors webserver's traffic and diagnoses when the average latency of the last requests is over a given threshold. At that point, the diagnostics raises
HeathError
which flags the service as unhealthy (i.e. healthy entrypoint returns 503). The swarm healthcheck mechanism can decide to restart it./v0/health
is new healthcheck entrypoint. The previous entrypoint,/v0/
, is kept as a run check.New webserver module:
diagnostics
: takes over the service monitoring, healthcheck & diagnostics entrypoints and its role is to monitor, diagnose and flag the state of the service.testing fixtures that emulate some of the situations found in actual deployed environs (see
services/web/server/tests/unit/test_healthcheck.py
)Various small improvements in servicelib (i.e. Many TODO annotations not just deleted and actually implemented ;-) ) [see commits and file changes for details]
Some fixes in Makefile for recipes with target
Fixed issue with
os.makedirs
failure in development mode (@ignapas pls check in your OS)Related issue number
Supports #1426
How to test
cd services/web make devenv install-dev make tests-unit
Checklist
make openapi-specs
,git commit ...
and thenmake version-*
)