Thanks, in fact I already understood that, but I would like to setup a distributed index in order to load balance requests between these two masters.
I call them “master” and “slave” because I can’t load balance trafic between the two, so at this time, I’m sending all my insert to one (“master”) and all my search requests to the other (“slave”), till I manage to create a proper distributed index. I don’t get how I should name my indexes given I need to prefix my requests with the cluster’s name.
Remote insert/replace/update to a replicated table is not supported yet, so there’s no syntax for that. For SELECTs the syntax for replicated tables doesn’t differ, i.e.
index dist_my_index {
type = distributed
agent = manticore-master|manticore-slave:9306:my_index
}
should work. But you can’t INSERT INTO dist_my_index. To make a change in a replicated table you have to do INSERT/REPLACE INTO cluster_name:table_name which can be done only locally on each node, so if you want to load-balance it you have to do it outside Manticore Search (using haproxy or perhaps proxysql or k8s service or just right in your app).
Hopefully in few months we’ll have sharding fully implemented which will make many things simpler including this one.