Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 一个事务是不是只有集群中的一个tidb server在处理?
Is a transaction handled by only one TiDB server in the cluster?
In a TiDB cluster with 3 TiDB servers, only one owner handles the same transaction, right? The other 2 are used to ensure high availability?
Yes, the TiDB server only parses SQL, forwards actual data read requests to the underlying storage nodes, assembles the returned results, and finally returns the query results to the client. It is generally used in conjunction with load balancing to distribute the pressure across multiple nodes. If a crash occurs during the execution of a transaction, the transaction on this TiDB server also fails. Multiple nodes can only ensure the high availability of the TiDB server.
TiDB is a Shared Nothing architecture. The TiDB server is a stateless computing node that does not store data and can dynamically increase the number of nodes. Multiple servers are used to share the load, with each server running a portion of the transactions.
Does this mean that a transaction can run on multiple TiDB servers separately? How is transaction consistency ensured?
A transaction can only be executed on one TiDB server.
Execute outside of an entity on a server, each server can run different entities.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.