Skip to content

1.1.4-SNAPSHOT

Choose a tag to compare

@Hyshmily Hyshmily released this 12 Jun 15:16

Dual-Buffer Counter

  • Lock-Free Batching Layer — Adds a dual-buffer counter before HeavyKeeper. Per-get() add(key, 1) calls are merged into periodic (100-500ms) add(key, N) batch submissions. Reduces lock contention from O(N) to O(1) under ultra-high concurrency (millions QPS).
  • Transparent to Callers — No API changes required. The batching layer operates silently, preserving existing get() semantics while dramatically reducing HeavyKeeper’s synchronization overhead.
  • Inspired by HotCaffeine — Adopts the proven dual-buffer design from HotCaffeine’s DefaultKeyCounter, adapted for HotKey’s HeavyKeeper integration.

Reporter Self-Protection (BBR + CPU Fusion)

  • BBR + CPU Fusion — Integrated BBR congestion control with CPU EMA into Reporter flush. BbrRateLimiter.tryAcquire() decides to admit or drop each batch based on concurrency budget and CPU load.
  • Two‑Zone Decision — Below 80% CPU: permissive (admit if concurrency within budget OR not in cooldown). Above 80%: strict (admit only if concurrency within budget). Prevents overload amplification.
  • CPU EMA — Smoothed via cpuDecay=0.95, 500ms interval, avoids thrashing on spikes.
  • BBR Sliding Window — 10s window, 100 buckets, tracks max pass rate & min RTT to compute safe concurrency limit.
  • Backpressure — Drops logged at DEBUG, metric hotkey.reporter.bbr.dropped. Self‑throttles before RabbitMQ/Worker overload.
  • Default Enabledhotkey.local.reporter.enabled=true. Zero overhead when healthy.