Slide 21
Slide 21 text
@tastapod
Phone Home — a pattern
Every component should heartbeat
There are lots of options for this:
- Broadcasting a UDP packet
- Writing to a service registry
- Sending a message
A single packet can carry 1500 bytes
- That’s a lot of information!
{
"name" : "product_search",
"app" : "online_shop",
"requires": ["other", "components"],
"address": {
"host": "10.0.0.135",
"port": "1337"
},
"heartbeat": {
"interval" : 500,
"mia_interval": 5000
},
"config": {
"git_revision" : "3ef82c",
"deployed_from": "Dan's laptop",
"deployed_by" : "Dan North",
"deployed_on" : "2016-01-15 13:22:00"
},
"status": {
"memory" : 80,
"cpu_load": [4.92, 2.94, 2.14],
"io_load" : 45,
"disk" : 72
},
"rel": {
"config": "/config",
"status": "/status"
}
}