Docs
The Javaeda topic sizer step by step — every formula it uses.
Inputs
- Peak messages per second is the busiest rate you expect on this topic, not the daily average.
- 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.
- Retention is how long Kafka keeps messages (retention.ms). Replication factor is the number of copies (3 is the usual production choice).
- 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.
- 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
- Ingress (MB/s) = messages/s × size × compression %. 1 MB = 1,000,000 bytes.
- Sized rate = peak × (1 + headroom). Partitions for throughput = ⌈sized ingress ÷ MB/s per partition⌉.
- 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.
- 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
- Written to disk = ingress × replication factor. Read by consumers = ingress × number of consumer groups (replica fetches between brokers come on top).
- Per day = ingress × 86,400 s. Disk for retention = ingress × retention hours × 3,600 × replication factor.
- Leave 10–20 % spare for index files and log segments that have expired but are not deleted yet.
Catch-up after a stop
- Backlog = peak messages/s × minutes stopped × 60.
- Spare rate = consumers × messages/s each − peak messages/s. Catch-up time = backlog ÷ spare rate.
- 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
- The command uses --partitions, --replication-factor, retention.ms (hours × 3,600,000) and min.insync.replicas.
- min.insync.replicas is 2 when replication is 3 or more, so producers with acks=all keep writing with one broker down; otherwise 1.
- 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
- Broker CPU, memory and the number of brokers; per-broker partition limits of managed services.
- Uneven keys: one hot key keeps a single partition busy whatever the total.
- Compaction (cleanup.policy=compact), tiered storage and cross-region replication.
Account and workspace
- Choose Sign up, then enter your name, email and a password with at least 8 characters, one letter and one number.
- You land in your workspace at /app. The sizer there keeps your last inputs in this browser (localStorage); clearing site data removes them.
- 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
- POST /api/auth/signup with JSON { name, email, password } → 201 and a session cookie; 409 if the email is taken, 400 on invalid input.
- POST /api/auth/login with JSON { email, password } → 200 and a session cookie; 401 on a wrong password, 429 after too many tries.
- GET /api/auth/me → 200 with the signed-in user, or 401 when signed out. POST /api/auth/logout ends the session.
- 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.