Reference

HeavyKeeper hot-key remediation

HeavyKeeper detection feeds hot-key remediation. Remediation policies are conservative by default: the built-in default is observe-only, and side-effecting action mode requires explicit operator enablement.

Policy scopes and precedence

Scope Example Precedence
TableTABLE app.eventsHighest
Namespace / keyspace / schema / databaseKEYSPACE app, SCHEMA app, DATABASE app, NAMESPACE appMiddle
ClusterCLUSTERLowest explicit
Built-in defaultsynthetic observe-only policyFallback

Policy fields

Field Meaning
modeobserve_only or action.
thresholdRemediation skew threshold; distinct from detector alert threshold.
window_msEvidence window for confidence.
min_confidenceRequired confidence for action planning.
cooldown_msCooldown before another action.
action_ttl_msRuntime action lifetime.
allowed_actionsDuplicate-free supported action families.
max_active_remediationsPlanning-time cap.
rate_limit_max_inflightRequired when rate_limit is allowed.
rate_limit_retry_after_msRequired when rate_limit is allowed.

Set and unset policies

SET HOT_KEY_REMEDIATION CLUSTER
WITH (
  mode = 'observe_only',
  threshold = 1000,
  window_ms = 60000,
  min_confidence = 0.8,
  cooldown_ms = 300000,
  action_ttl_ms = 300000,
  allowed_actions = [],
  max_active_remediations = 0
);
SET HOT_KEY_REMEDIATION KEYSPACE app
WITH (
  mode = 'action',
  threshold = 5000,
  window_ms = 60000,
  min_confidence = 0.95,
  cooldown_ms = 300000,
  action_ttl_ms = 300000,
  allowed_actions = ['rate_limit'],
  max_active_remediations = 8,
  rate_limit_max_inflight = 32,
  rate_limit_retry_after_ms = 50
);
SET HOT_KEY_REMEDIATION TABLE app.events
WITH (
  mode = 'observe_only',
  threshold = 2500,
  window_ms = 120000,
  min_confidence = 0.9,
  cooldown_ms = 600000,
  action_ttl_ms = 300000,
  allowed_actions = [],
  max_active_remediations = 0
);

Equivalent scoped ALTER form:

ALTER TABLE app.events
SET HOT_KEY_REMEDIATION
WITH (
  mode = 'observe_only',
  threshold = 2500,
  window_ms = 120000,
  min_confidence = 0.9
);

Unset restores inheritance from the next lower-precedence policy or the built-in default:

UNSET HOT_KEY_REMEDIATION TABLE app.events;
UNSET HOT_KEY_REMEDIATION KEYSPACE app;
UNSET HOT_KEY_REMEDIATION CLUSTER;

Show, explain, and expire

SHOW HOT_KEY_REMEDIATION FOR TABLE app.events;

EXPLAIN HOT_KEY_REMEDIATION FOR TABLE app.events;

EXPIRE HOT_KEY_REMEDIATION ACTION 'action-id';

Operational rules

Rule User-facing effect
Observe-only allows candidates but no routing side effects.You can inspect hot keys safely before action mode.
Policy identity is pinned to candidates/actions.Historical generations remain auditable.
Table policy overrides namespace policy, which overrides cluster policy.Local hot-key behavior can be scoped narrowly.
Dropped observations block action planning until a complete clean evidence window exists.Backpressure does not accidentally trigger unsafe action.
Raw hot-key bytes are not metric/log labels.Observability uses bounded fingerprints and scoped counters.
Strict CQL compatibility rejects remediation extensions.Enable MTS extensions to use this syntax.