The Message Handler accepts amphorae heartbeats and stores them

Registered by Jamie McCarthy

The Controller's Message Handler accepts health updates from amphorae and stores them in the HA database. The updates are very-low-information heartbeats ("I am alive"), delivered over UDP, on a frequency typically between 0.01 and 1.0 Hz. Post-0.5, this must scale to many amphorae.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Jamie McCarthy
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

We've decided that we're using a HealthMixIn class, per amphora-driver-interface.

We've decided that an amphora's health_daemon will confirm its identity to the handler by combining a format version number, its amphora UUID (different from its nova instance ID), and a sequence number, and cryptographically signing it. This must fit into 512 bytes to guarantee a single UDP packet. Using openssl seems like overkill. Possible python module: https://www.dlitz.net/software/pycrypto/api/current/Crypto.Signature-module.html ? Initial implementation does not need to be signed.

I believe that as scaling becomes important, heartbeats will be aggregated before updates are written, perhaps at a 1-second resolution (so e.g. a single MySQL UPDATE can commit all changes from that controller in that second). But to try to do this optimization for 0.5 would be premature.

(?)

Work Items

Work items:
Decide on a thread framework/model: TODO
Figure out the best/standard module to open the UDP socket listener and register a callback: TODO
Decide on a format to receive the amphora's UUID, sequence number, and version it: TODO
Decide which data store will be used (MySQL? in-memory dict?) and how to handle the first heartbeat: TODO
Decide how the public part of each amphora's key used to sign its heartbeats will be made available to the message handler: TODO

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.