Skip to content

Docs

The Javaeda topic sizer step by step — every formula it uses.

Inputs

  1. Peak messages per second is the busiest rate you expect on this topic, not the daily average.
  2. Average message size is key + value + headers in bytes before compression. Size after compression is the share left after the producer's compression.type (100 % = none); check it by comparing batch sizes in a test.
  3. Retention is how long Kafka keeps messages (retention.ms). Replication factor is the number of copies (3 is the usual production choice).
  4. One consumer handles is the messages per second one consumer instance processes end to end with your real handler — the number that usually decides partitions for Java services that call a database.
  5. One partition takes is the write throughput of one partition in a producer test on your cluster. Every field turns red when out of range and the results wait until it is fixed.

How partitions and consumers are computed

  1. Ingress (MB/s) = messages/s × size × compression %. 1 MB = 1,000,000 bytes.
  2. Sized rate = peak × (1 + headroom). Partitions for throughput = ⌈sized ingress ÷ MB/s per partition⌉.
  3. Consumers per group = ⌈sized rate ÷ messages/s one consumer handles⌉. A group cannot use more consumers than partitions, so partitions = the larger of the two.
  4. Example: 2,000 msg/s × 1,000 B at 50 % = 1 MB/s. With +50 %: 1.5 MB/s fits one 10 MB/s partition, but 3,000 msg/s ÷ 400 = 7.5 → 8 consumers, so 8 partitions.

Network and disk

  1. Written to disk = ingress × replication factor. Read by consumers = ingress × number of consumer groups (replica fetches between brokers come on top).
  2. Per day = ingress × 86,400 s. Disk for retention = ingress × retention hours × 3,600 × replication factor.
  3. Leave 10–20 % spare for index files and log segments that have expired but are not deleted yet.

Catch-up after a stop

  1. Backlog = peak messages/s × minutes stopped × 60.
  2. Spare rate = consumers × messages/s each − peak messages/s. Catch-up time = backlog ÷ spare rate.
  3. If the spare rate is zero or less, the group never catches up while the peak lasts — add consumers (and partitions) or make the handler faster.

The topic command

  1. The command uses --partitions, --replication-factor, retention.ms (hours × 3,600,000) and min.insync.replicas.
  2. min.insync.replicas is 2 when replication is 3 or more, so producers with acks=all keep writing with one broker down; otherwise 1.
  3. Replace localhost:9092 with your bootstrap servers. Partitions can be increased later but never reduced, and increasing them changes which partition a key lands on.

What the sizer leaves out

  1. Broker CPU, memory and the number of brokers; per-broker partition limits of managed services.
  2. Uneven keys: one hot key keeps a single partition busy whatever the total.
  3. Compaction (cleanup.policy=compact), tiered storage and cross-region replication.

Account and workspace

  1. Choose Sign up, then enter your name, email and a password with at least 8 characters, one letter and one number.
  2. You land in your workspace at /app. The sizer there keeps your last inputs in this browser (localStorage); clearing site data removes them.
  3. Use Log out in the top bar when you are done on a shared device. To delete your account, email contact@javaeda.com.

Account API

  1. POST /api/auth/signup with JSON { name, email, password } → 201 and a session cookie; 409 if the email is taken, 400 on invalid input.
  2. POST /api/auth/login with JSON { email, password } → 200 and a session cookie; 401 on a wrong password, 429 after too many tries.
  3. GET /api/auth/me → 200 with the signed-in user, or 401 when signed out. POST /api/auth/logout ends the session.
  4. Requests that change data must come from the same origin (cookie session, no API keys). The sizer itself has no API — it runs in your browser.

Javaeda is a sizing calculator: every result comes from the rates and sizes you enter. Load-test the topic on your own cluster before you rely on it.