Hi guys, we are noticing that in one of our clusters all writes are going to a single node and it is increasing the CPU usage of that node by a lot (constantly near 100%). We use the typesense load balanced endpoint to perform writes. It is a three node cluster, so I thought writes would be distributed between the three nodes.
We had this issue previously as well where all the reads were going to only one of the nodes. So we had our own load balancer that distributed the traffic between the nodes. Is it okay if we do the same for writes as well?
Thanks!
a
Alan Martini
07/25/2025, 3:36 PM
@Vamshi Aruru,
Do your cluster have SDN enabled?
It is ok, Typesense will replicate the writes to the other two nodes as soon as possible.
v
Vamshi Aruru
07/25/2025, 3:36 PM
Hi Alan, no this one doesn't have SDN.
a
Alan Martini
07/25/2025, 3:48 PM
Thanks for the info @Vamshi Aruru
When SDN is not enabled, the load-balanced endpoint will distribute requests uniformly. The fact that even in this setting, a node is receiving so many more requests might indicate DNS caching on the app server. In this case, flushing the DNS every 30seconds to 1 minute can help.
But since you already managed on your side, load-balancing the writes should not be a problem!
v
Vamshi Aruru
07/25/2025, 3:49 PM
Great, thanks for the confirmation!
k
Kishore Nallan
07/25/2025, 5:17 PM
One additional thing to note here is that all writes happen through the leader because that's how Raft guarantees serializability of writes. So even if you send the actual write to a follower, it will internally proxy the write to the leader first.
v
Vamshi Aruru
07/25/2025, 7:05 PM
Ah, that's what I wanted to know @Kishore Nallan, thanks a lot!