currently we are using old software that OneProxy for MySQL proxy.
we testing ProxySQL very well but the portions rule we don't know
how to set rule can replace it .
the original oneproxy setting is
[
{
"table" : "t_order_history_open",
"pkey" : "site_id",
"type" : "int",
"method" : "list",
"partitions":
[
{ "name" : "t_order_history_open_1", "group": "shop", "value" : ["1"] },
{ "name" : "t_order_history_open_4", "group": "shop", "value" : ["4"] },
{ "name" : "t_order_history_open_7", "group": "shop", "value" : ["7"] },
{ "name" : "t_order_history_open_10", "group": "shop", "value" : ["10"] },
{ "name" : "t_order_history_open_13", "group": "shop", "value" : ["13"] }
]
}
]
the rule example as following
when one shopping site want to write order into MySQL and site id is 10, oneproxy will find the site id partitions mapping file and replace t_order_history_open to
t_order_history_open_10
t_order_history_open is zero
real data in t_order_history_open_site_id
anyone can help ? how to write rule for ProxySQL and working.