Open sherodtaylor opened 4 months ago
Copying a response from Discord, in case others are also interested:
This will be 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 instances.
Based on what you know about marimo, if you have suggestions on how marimo might one day support stateless execution, we're open to hearing them.
@akshayka one model you can follow is how Airflow serializes it's objects. It would be useful for deployed programs as programs are built to be stateless.
https://airflow.apache.org/docs/apache-airflow/stable/authoring-and-scheduling/serializers.html
Thanks for the link. We'll likely look into this one day (perhaps we could patch globals()
to hit an external cache) — I appreciate how this would make horizontal scaling very easy — but it's not on our short-term roadmap.
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 any state necessary be offloaded to redis or refactoring to support stateless applications which have been a standard for a long time i.e. 12 factor apps
Alternative
Our internal kubernetes system doesn't support sticky sessions.
Additional context
error received: