OBProxy provides a simple SQL parser to extract the database name and table name from an SQL statement sent by the client. Then, the parser pulls the routing table for table partitions based on the tenant name, database name, table name, and partition ID.
The routing table refers to the list of IP addresses of the OBServers on which the leaders and followers of table partitions are stored. After OBProxy retrieves the preceding information, it forwards the request to the OBServer on which the leader replica to be accessed is stored and adds the location information of the leader replica to the location cache. When OBProxy accesses the leader replica the next time, it reads the location information in the location cache to speed up the access.