[Question]: multiple infinity-embedded instances connect to the same database,can it work?
Describe your problem
Planning to use infinity on k8s, not going to use server version of infinity for some reason. However, since there are more than 1 pod copy, I am considering mounting distributed file system on the pod, so that infinity instances on different pods can access the same directory/database, and if simultaneous writes will conflict, I am considering using file locks, etc. to solve the problem, is this approach feasible?
I think it's not possible. Infinity is not a file 'opener'. In fact, every write to a file brings about a change in the memory state of the write instance. We wrote on instance A, and the file has changed. At this point, if you go to instance B to read, there is a high probability that you will not be able to read the content, because B will first determine whether there is an update based on the current state in memory.
I strongly recommend using the Infinity server version, as the new feature of Infinity 0.5.0 includes the ability to use minio as shared storage with read / write node replication capabilities, which can solve the issues with Kubernetes on Infinity
Thank you for reply. So the Infinity server version can have multiple copies of the pod at the same time, using the same minio shared storage?
Thank you for reply. So the Infinity server version can have multiple copies of the pod at the same time, using the same minio shared storage?
Yes, you can set one of them as the write node, others are read nodes.