5 ms·
> lose their state if a pod goes. sounds like you are using Elixir on Kubernetes. What is the experience and the reasoning with this? I was thinking about this
by ofrzeta 1y ago
> lose their state if a pod goes.
sounds like you are using Elixir on Kubernetes. What is the experience and the reasoning with this? I was thinking about this and read on many blogs that it is somehow redundant because Kubernetes implements something like "let it crash" on its own when it's already an Erlang/OTP/Beam concept.
- cultofmetatron 1y agosaem idea, different levels of the abstraction Kubernetes handles let it crash at the process level. so we have one erland vm running inside a docker container and it is the only tennant on its individual machine. this is managed by kubernetes. kubernetes also exposes a discovery endpoint so that all the erland vms we have can be aware of each other and form a cluster. IF something takes down the erlang vm (its exceedingly rare but it does happen), kubernetes will bring up a new one. erlang's let it crash apply to its lightweight processes which are really just fancy threads with a vm specific scheduler and heap allocation. if somethign crashes a genserver, erlang handles it. TLDR: they compliment each other
- auraham 1y agoThat is an interesting mix. Wonder if it is possible to send messages among Erlang VMs in different pods. If Kubernetes is not involved, passing messages between Elixir nodes is easy. We just need the name of thr node (and a cookie, if needed). Not sure if that is possible inside a Kube cluster.
- krnsi 1y agoSure, have a look at Biwalkers library libcluster and especially at the Kubernetes Strategies. For example this one: https://hexdocs.pm/libcluster/Cluster.Strategy.Kubernetes.html https://hexdocs.pm/libcluster/Cluster.Strategy.Kubernetes.ht...