Data model
Storage structure
Storage structure is as the following:
Service layer
Cluster layer
Info entries as KV
Value entry in "Key, Value" pair
Value contains the location of the server
And it could also contains the grouping of server. For example, VIP clients should only be directed towards VIP servers.
Zookeeper example
How many nodes are online.
How many nodes are operating correctly.
What are the resource (CPU, memory, disk) usage states for these online nodes.
If resource usage exceed the threshold, receive an alert.
┌─────────────────────────┐
│ │
│ Monitoring Center │
│ │
└─────────────────────────┘
▲
│
Step3.
Watch mechanism for
directory file change
│
│
┌──────────────────────────────────────────────────────────┐
│ Zookeeper │
│ │
│ ┌──────────────────────────────────────────────┐ │
│ │ Root dir │ │
│ │ ---server001: json blob for resource │ │
│ │ ---server002: json blob for resource │ │
│ │ ---server003: json blob for resource │ │
│ │ ... │ │
│ │ ---server00N: json blob for resource │ │
│ │ │ │
│ └──────────────────────────────────────────────┘ │
│ │
└──────────────────────────────────────────────────────────┘
▲
│
│
step2. │ step1.
┌─report resource health via ─┬─────────┴─────────────────┬────────create an ephemeral──┐
│ heartbeat msg │ │ node upon start │
│ │ │ │
│ │ │ │
│ │ │ │
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Server node 1 │ │ Server node 2 │ │ Server node ... │ │ Server node N │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ ┌────────────┐ │ │ ┌────────────┐ │ │ ┌────────────┐ │ │ ┌────────────┐ │
│ │ Agent │ │ │ │ Agent │ │ │ │ Agent │ │ │ │ Agent │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ └────────────┘ │ │ └────────────┘ │ │ └────────────┘ │ │ └────────────┘ │
│ │ │ │ │ │ │ │
└──────────────────┘ └──────────────────┘ └──────────────────┘ └──────────────────┘
Last updated