4. Metrics Aggregation
- pre-aggregation in monitoring agent
- N measures per minute -> sum, max, min, avg, rates, percentiles
- aggregation plans in Sematext backend (Java / Hadoop)
- 1 min, 5 min, 1 hour, 1 day, 1 week, 1 month
- fast queries over long periods of time and multiple dimensionsâš
(e.g. filters for host, process/worker id)
5. Store & Forward
1)Buffer Metrics when the receiver is not reachable ...
2)Re-transmit metrics, stored in NeDB
6. 1 http.post(options, cb1)
3 http.post(options, cb2)
3 http.post(options, cb3)
4 http.post(options, cb4)
5 cb4 (err)
5 cb1
6 cb2
7 cb3
Java
Server
Threads, Thread Pool,
limited e.g. max 3
Node Client & Java Backend
async,
non-blocking
Main + Event
Loop Thread
HTTP 500
internal server error
Luke be nice to
Node.js Client
7. âA stupid guy called âTravisâ, made DoS attacks!!!â
8 Minute Unit Tests for network/storage test cases
30 seconds :)
8. OS Metrics limited in node.js API
- Limited Memory info os.freemem(), os.totalmem()
- a few missing CPU metrics: os.cpus()
- No Disk stats in node API
9. How to Load the Monitoring Agent?
OK - for Devs, but Ops donât like to touch source code ...
Node 4.x to the rescue! âš
Pre-loading modules with â-râ / require
10. Garbage Collection
- Incremental marking and lazy sweeping
- marking âstop the worldâ
- Incremental GC cycles (scavenge)
- Full GC cycles
- What should be measured?
- Count of GC cycles
- Rate GC cycles / time
- Sum GC Time
- Released Memory (before GC - after GC)
12. NPM modules for GC info
- gc-stats
- gc-profiler
- memwatch(-next)
- missing gc times
- + leak detection
- + heap diff
Native C++
modules V8
API / NAN 1.x
vs. NAN 2.x