Manticore distributed, replicated RT cluster

Dear all,

I would like to set-up a cluster with RT index and use it through a distributed index.

I’ve actually managed to set up a RT index cluster and I am prefixing all my INSERT/UPDATE/REPLACE/DELETE queries with my cluster’s name :

INSERT INTO my_cluster:my_index ...

All my insertion queries are sent to my “master node” and all my “select queries” are sent to my “slave node”.

I would like now both to be master/slave, in order to be fully scaleable.
Do I need to set the distributed index like this :

index dist_my_index {
  type  = distributed
  agent = manticore-master|manticore-slave:9306:my_index
} 

and prefix my queries with my_cluster:dist_my_index?

Or should I prefix my index like this :

index dist_my_index {
  type  = distributed
  agent = manticore-master|manticore-slave:9306:my_cluster:my_index
} 

And call my distributed index with dist_my_index?

Moreover, if the underlying indexes are synced in the cluster, do I need to do this:
ALTER CLUSTER my_cluster ADD dist_my_index

Sorry for all the questions but I did not manage to find answers to this in the documentation.

PS: The link to the forum from the documentation is dead.

Manticore provides fully synchronous master-master replication, so all your nodes are masters and slaves at the same time.

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.

Ok thanks, it makes things clearer now. I will load balance on my end.