11 Replies
marimo is stateful so it doesn’t support multiple instances at once. You will need to build a layer on top to manage this
i see
(or drop to one machine if you can)
where would you start
i'm deploying in my companies which is using kubernetes
so multiple containers w/ no control over it
it’s a concept called Session Affinity on most cloud providers. If you have a load balancer between your Kubernetes - you could enable it.
Usually you can set the scale factor or turn off autoscaling for k8s. Do you not have access to that? Can you ask?
yeah our kaas doesn't support it and requires us to be stateless....
its an internally managed and built tool
is there a way to manage the state via redis or something?
not at the moment - it’s quick difficult since there is a lot of runtime state (not all serializable)
btw just created an issue if thats okay it seems like a fair ask whether prioritized soon or not
GitHub
Support stateless deployment · Issue #1831 · marimo-team/marimo
Description I have a custom kubernetes deployment that requires stateless applications which has been a standard for a long time. Suggested solution I'd like to be able to deploy the app and an...
This will be extremely difficult since not everything is serializable so can’t be stateless. These are running programs that inherently have state. Even if we made marimo stateless, your code may not be (e.g threads, db connections, etc)
I think a better request would be a load balancer that can manage multiple instance