OceanBase Database Proxy (ODP) 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 OBServer nodes on which the leaders and followers of table partitions are stored. After ODP retrieves the preceding information, it forwards the request to the OBServer node on which the leader replica to be accessed is stored and adds the location information of the leader replica to the location cache. When ODP accesses the leader replica the next time, it reads the location information in the location cache to speed up the access.