Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: multiple infinity-embedded instances connect to the same database,can it work? #2294

Open
chenk-gd opened this issue Nov 25, 2024 · 2 comments
Labels
question Further information is requested

Comments

@chenk-gd
Copy link

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?

@chenk-gd chenk-gd added the question Further information is requested label Nov 25, 2024
@JinHai-CN
Copy link
Contributor

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.

@JinHai-CN
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants