-
I'm looking to understand the operational concerns of running Flyte at scale. I'm especially concerned about the performance characteristics of Postgres which can easily become a SPoF and scaling challenge at even modest amounts of activity over time. In particular it is not clear what data is going into PG DB rows versus object store blobs. More generally it would be informative to have benchmarks to guide for resource usage. To kick off some questions, consider a story where there are ~100 workflows and ~1000 versioned tasks used to run 1M tasks per day. Some questions might include...
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
hi @mrgleeco, Let me try and answer the question in 3 parts
Part 1: Understand general architecture and scaling primitives**It is crucial to understand the architectural choices to understand how things can scale. Metadata storage - workflow/task versions and definitionsPostgres is used as the datastore for workflow versions and used to visualize various UI elements. It is assumed that even at large volume number of workflows and tasks will not exceed 50k and version frequency will not exceed a daily rate. Also all primary keys are supposed to be partitioned by Execution state storeIf you carefully look at the architecture, Flyte uses Multi cluster to scale out state storeFinally we have seen problems with scaling a single KubeAPI server, but this is where Flyte supports multi cluster mode that can help scale out across multiple k8s clusters. Execution observation storeThis is where the execution information is stored for visualization and recovery. It is not required that this store be in sync with the state store, but In our opinion we feel if we do not record what has been done, what is the use of making progress :). The default flyte installation, makes this synchronous to write the "observation - events" from flyte propeller to "flyte control plane", and this is written to Postgres. The datamodel has been intentionally been built that it does not use any of an RDBMS features - no large joins, no special indexes and it is concievable posslbe to build it on dynamoDB. Another way could be to just buffer the events in an intermediate log before replicating (like kafka). Again we have not yet seen a need for this at most companies - from Lyft to Spotify to many others. Also every execution is independent from every other execution and hence the data can be easily deleted if really so desired. Some users do partitioning based on execution start time and hence easy to reap. Flyte does not ship with any special db management systems today. This remains an active area of work. Part 1b: Side note: Liveness/ Safety propertiesA goal when designing Flyte was that executions should continue to progress even when the core db is down for scheduled maintenance, including down for minutes (this is configurable). All execution progress (starting new tasks) will be paused, but existing long running tasks - often the case in Machine learning and data processing workflows - will continue to run. Also all metadata regarding task execution (to ensure tasks can run) is actually stored in a blob store, to ensure high availability (albeit at the loss of some performance). The performance actually can be seriously improved by simple caching. Part 2: Benchmarks, object store vs PostgresCurrently we do not actively publish any benchmarks, but we are publishing scripts to understand performance much better. Part 3:how many tables at day.1? At day.365?
how many rows at day.1 and at day.365?
how many indexes? How many are primary vs secondary?
is there any background archival activity?
what are some of the recommended PG config settings?
FutureKeep an eye out to an exciting update coming soon that makes it much easier to run Flyte on Notes
|
Beta Was this translation helpful? Give feedback.
-
Thanks @kumare3 wdyt? |
Beta Was this translation helpful? Give feedback.
hi @mrgleeco,
Firstly thank you for raising this question and asking to clairfy instead of assuming :).
Let me try and answer the question in 3 parts
Part 1: Understand general architecture and scaling primitives**
It is crucial to understand the architectural choices to understand how things can scale.
Metadata storage - workflow/task versions and definitions
Postgres is used as the datastore for workflow versions and used to visualize various UI elements. It is assumed that even at large volume number of workflows and tasks will not exceed 50k and version frequency will …