Replication on 2 nodes, is it possible?

I’ve created a 2 node cluster (node1 as the primary, node2 as the secondary), see the below steps, and apparently it works fine. I can reach the replicated table contents from both nodes.

# node1:

CREATE CLUSTER qqq1 'qqq1' as path, 'node1:9312,node2:9312' as nodes;

# node2:

JOIN CLUSTER qqq1 AT 'node1:9312' 'qqq1' as path;

# node1:

create table t (a int, b text);
alter cluster qqq1 add t;
insert into qqq1:t (a,b) values(1, 'aaa');
select * from qqq1:t;

# node2:

insert into qqq1:t (a,b) values(2, 'bbb');

Now the problem arises when I simulate an error with rebooting node2. After the reboot it has no idea about table “qqq1:t”. How to mitigate the problem?

If you rebooted only node2 while node1 remained online during node2 's downtime, there shouldn’t be any issues. Check the searchd logs for anything unusual. Remember, you can run the instances with --logreplication to enable more detailed replication logging.