baMulti-Master cluster brings us better write performance — Another interview process

LORY
11 min readNov 5, 2023

The Interview story

Last week. senior backend position.

“Here you mentioned that lead and scaled database from a single node to cluster, archived better performance, could you please elaborate more?” I asked.

“Sure. I was the lead of this project. We migrated our single node database to the master-master setup database. so we archived scalability and better performance”. the candidate answered.

“Are you sure master-master setup brings you better performance? read or write, how many nodes and which database? and how much faster?” I asked many questions in one go because I was very interested to know.

“We migrated Mariadb to 3 node Galera cluster. Our system has a large number of write requests so the write performance improved”. he said.

“Well that sounds interesting AFAIK, Galera is not built to boost up the system throughput, but focuses more on data consistency. but anyway I will find out thanks for the answer” I said.

“Have you faced any issues when using master-master setup?” I asked

“Yes, sometimes network slowness happens and the poor network connection between nodes causes issues,” he said.

“What kind of issues?” I asked.

“Well, sometimes the node is out of sync. and after some time the node comes back automatically” he said.

“Do you see a risk here when ‘node comes back’ because all nodes are master?” I asked.

“So far no. after the node comes back the cluster is back to normal” he answered.

“Have you faced the ‘split brain’ case? After some nodes came back, the cluster could be split into 2 or more.” I asked.

“No. but yes I have heard of the ‘split brain’ issue not sure how to fix that”. he answered.

“Here you mentioned your system using kafka as a message broker, are you the lead of this project as well?”I asked.

“Yes. kafka is also setup and integrated by our team”.

“Since you already setuped Kafka, and you know it also brings in the zookeeper? do you think zookeeper can handle the ‘split brain’ problem we just talked about?” I asked.

--

--

LORY

A channel which focusing on developer growth and self improvement