ConfigMap kafka-retention/overview ns/docs

A browser-only tool for calculating optimal retention.bytes settings for Kafka topics based on your storage configuration and topic specifications. No backend, no tracking — all calculations run locally.

Pods kafka-retention/features ns/docs
Storage Configuration
Input your Kubernetes storage setup (PVCs, storage size)
Topic Management
Add multiple topics with custom partition and replication settings
Real-time Calculations
Instant retention calculations as you modify inputs
Topic Weighting
Prioritize topics with custom weight allocation (1–100%)
Comprehensive Results
Detailed retention settings with storage utilization metrics
Retention Time (beta)
Estimate data retention duration based on event rate and size
ReplicaSet kafka-retention/how-it-works ns/docs

The calculator determines optimal retention.bytes settings by:

  1. Calculating Total Storage: Multiplies PVC count by PVC size to determine total available storage
  2. Applying Kafka Overhead: Reserves a configurable percentage of total storage for Kafka internal operations, log segments, and system files
  3. Weighted Storage Distribution: Allocates remaining storage based on topic weights and partitions
  4. Accounting for Replication: Adjusts retention based on replication factor requirements
  5. Providing Metrics: Shows storage utilization, retention per partition, and summary statistics
ConfigMap kafka-retention/retention-time-beta ns/docs

When you provide event size and volume information, the calculator estimates how long data will be retained based on your storage configuration.

  • Event Volume per Topic: The retention time calculation refers to the combined event rate per second for each individual topic. It does not account for events selectively routed across multiple topics.
  • Topic-Specific Calculation: Each topic's retention time is calculated independently based on its allocated storage and the specified event volume.
  • Formula: T = TopicStorage / (EventRate × EventSize × ReplicationFactor)

Example: 400,000 events/sec at 1 KB, replication factor 2, 2,400 GB topic storage → ~50 minutes retention.

ConfigMap kafka-retention/usage ns/docs

Storage Configuration

  • PVCs: Total number of Persistent Volume Claims in your Kafka cluster (equals number of Kafka pods)
  • PVC Size (GB): Size of each PVC in gigabytes
  • Overhead (%): Reserved for Kafka internal operations — min 10% recommended

Topic Configuration

  • Name: Descriptive name for your topic
  • Partitions: Number of partitions for the topic
  • Replication Factor: Replication factor (1–3, typically 3 for production)
  • Weight (%): Storage allocation priority (1–100%). Higher weights get more storage

Results

  • retention.bytes (exact): Raw calculated value for Kafka topic configuration
  • retention.bytes (rounded): Recommended value with extra headroom
  • Storage per Partition: Available storage per partition
  • Storage Utilization: Percentage of available storage used by each topic
ConfigMap kafka-retention/example ns/docs

Storage: 3 PVCs × 100 GB = 300 GB total — 60 GB overhead (20%) — 240 GB available

Topics:

  • user-events — 6 partitions, RF=3, Weight: 80%
  • system-logs — 3 partitions, RF=3, Weight: 20%

Results:

  • user-events: retention.bytes = 11,453,246,122 (~10.67 GB) — 80% allocation
  • system-logs: retention.bytes = 5,726,623,061 (~5.33 GB) — 20% allocation
ConfigMap kafka-retention/formula ns/docs
Total Storage        = PVC Count × PVC Size (GB)
Available Storage    = Total Storage × (1 - overhead%)
Weighted per Topic   = Available Storage × (Topic Weight / Total Weight)
Storage per Part.    = Weighted per Topic / Topic Partitions
Retention Bytes      = Storage per Partition / Replication Factor

Browser compatibility: Chrome 60+Firefox 55+Safari 12+Edge 79+