I split all table to several db server .such as : table1/2/...10 in serverA, table11/12... in serverB.
I want to achieve the goal:
a sql query: select * from table1 ;
use lua to transmit this query to serverA . if query table is in B, transmit it to B
I research rw-splitting.lua
in proxy doc , it's only change proxy.connection.backend_ndx .but I test to change it in read_query()
, but can't work.