What if your data vanished the moment your main server failed? ISR stops that nightmare.
Why In-sync replicas (ISR) in Kafka? - Purpose & Use Cases
Imagine you run a busy online store where orders come in every second. You keep a list of orders on one computer. If that computer crashes, you lose all recent orders and your customers get upset.
Relying on just one computer means if it fails, data is lost. Manually copying data to other computers takes time and can miss updates. This causes delays and errors, making your store unreliable.
In-sync replicas (ISR) automatically keep copies of data on multiple computers updated at the same time. If one fails, another ready copy takes over instantly, so no orders are lost and your store stays open.
producer.send(data)
# no guarantee data is copied to other servers immediatelyproducer.send(data).get()
# data is confirmed on all in-sync replicas before continuingIt enables reliable, fault-tolerant systems that never lose data even if some servers fail.
When you post a message on social media, ISR ensures your post is saved on multiple servers instantly, so it won't disappear if one server crashes.
Manual data copying is slow and risky.
ISR keeps multiple copies updated together automatically.
This protects data and keeps systems running smoothly.