More than three Database Servers

Is it possible to have more than 3 database nodes? I know in theory when is down one of the others is supposed to be promoted but it seldom seems to work properly. I just need 4 right now so if one fails it doesn’t just get stuck. So my idea is have 4 because you need 3. Presently have 5 but if one fails it becomes an issue, because it then thinks it a has 2.

Not possible at the moment. A non-database node gets promoted to database only if an existing database node gets removed (with lxc cluster remove), not if it’s down.

It should be automatic otherwise it gets stuck, and you can’t issue command.

We are working on this at the dqlite level.

The plan is to have all LXD servers be part of the database cluster too. Only have 3 voting members, have up to 5 non-voting members (will receive data but not be blocked on it) and have the rest as idle members. If a voting member goes down, a non-voting becomes voting, if we go below 5 non-voting we promote idle to non-voting.

We may also allow tweaking the number of servers for voting or non-voting, though more than 3 voting is usually a bad idea (and so is less than 3), non-voting is somewhat arbitrary but as the rest can be promoted to non-voting, there isn’t much point in having a lot of those either, causes more network traffic.

This would be a great idea. almost top priority in my mind. It should also do a dated db backup once a day or something. The DB isn’t very big, and in our experience the DB getting corrupted or records gone missing seem to be a major cause of issues.

1 Like