7.4.1. Connector Routing Methods

The supported routing methods, typical uses and use cases are listed in Table 7.1, “Routing Method Selection”.

Table 7.1. Routing Method Selection

Routing Method Host Selection Auto R/W Splitting Replica Latency Maximum Applied Latency
Smartscale By Session Yes (by SQL statement) Lazy Yes
Direct Reads By Content Yes (by SQL statement) Lazy Yes
Host-based By Hostname No Yes Yes
Port-based By Network Port No No Yes
SQL-based By SQL comment No No Yes

Important

Both SmartScale and R/W splitting cannot be enabled at the same time. This is because they are two sides of the basic functionality. R/W splitting and SmartScale both use SQL introspection to determine whether a query should be directed to a Primary or a Replica. SmartScale combines this with an intelligent load-balancer. R/W splitting uses a simpler direct redirection.

In addition to the selection and configuration mechanisms supported, a routing method should be chosen based on your application abilities: