beardedeagle / mnesiac

Mnesia autoclustering made easy!
MIT License
130 stars 21 forks source link

Any examples of this working in a k8s environment? #93

Open eliasdarruda opened 1 year ago

eliasdarruda commented 1 year ago

Question

I'm wondering how would it work in a k8s environment with a multi node or single node volume. Does anyone have a working example already?

beardedeagle commented 1 year ago

Yes, mnesiac should work in kubernetes though I don't have an example readily available, apologies. Might be good to get something added to the docs about it at some point though.

eliasdarruda commented 1 year ago

I've tried to use disc_only copies with multiple pods, the problem is that each pod has its own unique hostname, and it ends up creating ghost mnesia copies that ends up blocking other new pods rolling out

I'll try to use a statefulset to keep the hostname predictable across multiple pods.

I'll keep adding here what I can find for those who want to use disc only copies with k8s

acrolink commented 8 months ago

Any news on this? Working examples?

eliasdarruda commented 8 months ago

I've managed to write an example here:

https://github.com/eliasdarruda/mnesia-with-k8s

This is a working version using Mnesiac and kubernetes with StatefulSet, this is saving and recovering the state correctly on rollouts and new setups.

@acrolink

acrolink commented 8 months ago

@eliasdarruda Thank you very much for sharing.