Skip to main content
PreparationZone Logo
PrepZone

acks, Retries, and Durability Tuning

acks=all, min.insync.replicas, and retry policy — the producer settings that prevent silent data loss.

Pass checkpoint below

Why this matters

  • VaultCommerce production uses acks=all with min.insync.replicas=2 — no silent loss on single broker failure.
  • acks=1 saved 2ms but lost orders during a follower lag incident — never again on financial topics.
  • Retries without idempotence create duplicates — pair retries with enable.idempotence=true.
  • Most common producer tuning question in senior interviews.
acks=0
No wait
May loseFire and forget
acks=1
Leader ack
Leader crash risk
acks=all
ISR ack
DurableProduction
acks=0 is fastest but may lose data. acks=all waits for all ISR replicas — production default.

acks levels

acks=0: fire-and-forget, no broker ack. acks=1: leader wrote to local log. acks=all: all ISR replicas acked. VaultCommerce uses all for order and payment topics; 1 only for debug telemetry.

Key points

  • acks=all — wait for ISR replication before success
  • min.insync.replicas — broker-side gate; writes fail if ISR too small
  • retries — producer resends on retriable exceptions
  • delivery.timeout.ms — upper bound for total send attempt duration
  • NotLeaderOrFollowerException — transient; retries after metadata refresh

The rest of this guide is part of Pro

Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.

Still to come · 2 sections

  • Retry and delivery timeout
  • VaultCommerce rollout checklist

Test yourself

Answer these before moving on — recall is what makes it stick.