How can I implement resolution of conflicts when I use Tarantool in multi master scenario?
I'm developing a service which should be highly available, so decided to use nginx as a load balancer (with backup directive) for two nodes of tarantool (with disabled read only option). It retries failed requests to other node, but in case of network issues (for instance, between nodes of tarantool) conflicts may occur.
How can I implement one of the following scenarios:
- Choose a newer tuple on each node
- Custom logic (may be another space for conflics and so on)
Another question is how can I define unique nullable compound index (null is a value which can occur multiple times)
| id | user_id | type | {some data} |
Indexes:
id - PK
user_id + type - unique nullable tree index (type is nullable)
user_id has non unique tree index