From a counter to the store
Illustrative exampleNumbers here are illustrative: round figures to reason with, not measurements.
The service only adds to counters in memory; nothing on the request path waits for monitoring. A pair of collectors reads every service every 15 seconds (short batch jobs push instead), and ingest validates the batches, refuses series over a limit, and keeps every sample on two machines behind a write-ahead log before saying yes. If the store is slow, every buffer on the way is bounded and drops the least important data first.
- The checkout service adds 1 to its request counter in memory.
- A collector pair reads the counters every 15 seconds.
- Ingest checks limits and keeps the batch on two machines before acknowledging.
- The store appends each sample to its series.
Diagram as text
Components: Checkout service (Service); Collector pair (Worker); Ingest (Service); Store, two copies (NoSQL DB); Short batch jobs (Worker); Owning team (User). Connections: Collector pair → Checkout service (every 15 s); Collector pair → Ingest (batches); Ingest → Store, two copies (logged, replicated); Short batch jobs → Ingest (push a batch); Ingest → Owning team (refused series), asynchronous.
Read:Learn: Write-heavyLearn: High-level architecture
Keep reading+1 min
Two collectors, one set of graphs
If both collectors write their own copy, each copy carries a replica label, and queries read one replica per series, switching to the other when it has a gap. The alternative is a replicated queue in front of the store, with a single collector per target and a lease that moves it if the collector dies.
Check yourself
The store is down for ten minutes during a big deploy. What does checkout notice?
Show answer