Closed Bug 641289 Opened 13 years ago Closed 13 years ago

simplify heartbeat.php

Categories

(Cloud Services Graveyard :: Server: Sync, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: petef, Assigned: telliott)

Details

Attachments

(1 file)

We're routing /__heartbeat__ to heartbeat.php and want to use that URL for health checks. Currently heartbeat.php checks if the database is up or not; instead, it should just echo "OK" and emit a 200. We have other systems in place to check on db health; __heartbeat__ is just for checking that the entire apache/php/network combination is functioning.
__heartbeat__ was designed specifically to check that *all* external resources required by the application are functioning correctly, not simply apache/php/network.  this ensures that the web app itself has any chance of working at all before we permit zeus to send it traffic.  is it necessary to reduce this check to apache/php/network only?
We explicitly do not want PHP to check the database layer; for one, we are implementing it at the zeus layer (so as to not break the entire site when one DB goes hayware) and two, what DB would /__heartbeat__ monitor? scl2 will have 720 separate sql connect strings to monitor.

just 'echo "OK";' is enough for /__heartbeat__, IMO, and if we get 200/OK back in a reasonable amount of time, the apache/php/network portion of things should be considered healthy enough to activate in the zeus pool.
I'm completely okay with dropping the database checks.  No opinion on memcache or ldap slave checks.
If the heartbeat is just "webserver up", I don't see why we wouldn't do that with a static file.
(In reply to comment #4)
> If the heartbeat is just "webserver up", I don't see why we wouldn't do that
> with a static file.

because I want to test that the whole apache/php stack is ok, too.
Attachment #519267 - Flags: review?(petef)
Comment on attachment 519267 [details] [diff] [review]
More lightweight heartbeat

I get all the tough reviews! LGTM after extensive testing.
Attachment #519267 - Flags: review?(petef) → review+
pushed in http://hg.mozilla.org/services/sync-server/rev/a4f556d408e4
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: