Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 读写连接同一个tidb好,还是连接不同的tidb好,这块有区别吗?
[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version] 7.3
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots / Logs / Monitoring]
Is it better to connect read and write operations to the same TiDB instance, or to different TiDB instances? Is there a difference in this regard?
Short connections don’t matter, but long connections will definitely be fixed on one TiDB.
Read-write separation is also possible.
If resources are sufficient, read-write separation is definitely better.
The reason for master-slave separation is that a monolithic database cannot handle double writes.
There are some points I didn’t consider. If there is a big data team, you can consider read-write separation, directing all AP queries to the same TiDB and setting the engine to TiFlash.
There are some points I didn’t consider. If there is a big data team, you can consider read-write separation, directing all AP queries to the same TiDB and setting the engine to TiFlash.
Yes, the advantage of this is that even if your AP business is completely down, it will not affect the TP business.
Reply to avoid missing the daily check-in.
Connecting to different TiDB instances is good.
Doesn’t the official recommendation suggest using HAProxy?
It’s definitely better to be different.
Check-in to avoid breaking the streak.
Reply to avoid missing the daily check-in.
Connecting to different TiDB instances is good.
It’s best to use load balancing and not worry about this issue.
If resources are sufficient, separation is definitely better. If resources are insufficient, remember that the official team previously released a method for implementing SQL rule-based routing for separation.
Reply to avoid missing the daily check-in.
Best practice: separate instances if possible.
If you can use load balancing, then use load balancing.
Isn’t automatic load balancing good?