GitHub user yrenat created a discussion: Proposal: Automatically terminate idle Kubernetes Computing Units
## Background When running Texera on Kubernetes, computing units (CUs) remain alive even after they become idle. Although keeping idle CUs can reduce startup latency for subsequent workflow executions, they continue consuming cluster resources unnecessarily when they remain unused for an extended period. As a result, clusters may gradually accumulate idle computing units, reducing the amount of resources available for active workloads. ## Proposal Issue https://github.com/apache/texera/issues/5362 proposes introducing an automatic cleanup mechanism for idle computing units. The basic idea is to periodically check the status of running CUs and terminate those that have been idle for longer than a configurable timeout. This allows inactive resources to be reclaimed automatically while still giving users the benefit of reusing recently active computing units. The timeout should be configurable so that different deployments can choose an appropriate balance between resource utilization and startup latency. ## Initial Scope For this proposal, the implementation focuses on: * adding a configurable idle timeout; * periodically checking whether a computing unit has been idle beyond the configured threshold; * automatically terminating eligible idle computing units; * ensuring active computing units are unaffected. This proposal intentionally focuses on basic idle cleanup. More advanced policies (for example, different timeout strategies or discussions based on frontend heartbeat signals) can be discussed separately if needed. ## Questions for Discussion * Does periodically terminating idle computing units align with the intended Kubernetes resource management strategy? * Is a single configurable timeout sufficient, or should different types of computing units have different timeout policies? * Are there scenarios where idle computing units should intentionally remain alive and therefore be excluded from automatic cleanup? I have prepared an implementation of this proposal for reference in PR #6046. GitHub link: https://github.com/apache/texera/discussions/6264 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
