3

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.

Titouan de Bailleul
  • 12,920
  • 11
  • 66
  • 121
malphi
  • 31
  • 1
  • 3

1 Answers1

0

To my knowledge proxy doesn't give you that functionality. There are other commercial products that perform this query routing according to a sharding policy and not only that they also can run queries on all databases and combine results, reshard the data for addr or removed dbs online, monitoring and management of the system, and much more. I recommend you look at Scalebase (disclaimer I work there) at www.scalebase.com.