Metrics, diagnostics, graceful shutdown và leak-safe redeploy
Production debugging nối client symptom với connector, executor, application, JVM và downstream evidence trên cùng timeline.
Operations
Signals
Đo connections, current/busy/max threads, queue/reject, request count/error/bytes/duration, sessions và access logs. Kết hợp CPU/GC/allocation, DB/HTTP pool waits và dependency latency; connector utilization thấp không loại trừ downstream bottleneck.
Diagnostics
Thread dump/JFR cho stack state theo thời gian; GC/NMT/heap evidence cho memory; classloader count/dominator cho redeploy. Access log cần request ID, status, bytes và duration nhưng privacy/volume/rotation có budget.
Graceful sequence
Readiness false/remove load balancer → stop intake/pause connector → drain keep-alive, in-flight và async → stop app executors/consumers → close pools → exit trước orchestrator grace. Liveness không thay readiness/drain.
Verification
Gửi SIGTERM khi có long/async request, keep-alive và background consumer; xác minh policy committed work, deadline và process tree. Load test baseline/failure/mitigation với cùng workload; sau recovery phải kiểm queue drain và latency trở SLO.