Container Instance State Switching for Fast Serverless Scaling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing serverless computing systems face challenges in achieving rapid and elastic scaling of application instances due to long elastic times, resource wastage, and limitations in snapshot management, leading to inefficiencies in adapting to changing traffic demands.
Innovation Solution
A container-based application management method that allows instances to transition between online and low-power states dynamically, utilizing resource quota limits, CPU and memory downgrades, and memory swapping to reduce resource consumption and enable quick scaling.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If application instances are elastically scaled according to real-time traffic, then resource utilization is improved, but elastic time becomes too long causing delayed scaling response
Solution Approach 1:
The system performs preliminary actions by creating snapshots of application instances before scaling operations. When scaling up is needed, pre-warmed instances can be quickly restored from snapshots rather than starting from scratch. When scaling down, snapshots are prepared in advance so that instances can be rapidly restored when traffic increases again, significantly reducing elastic time.
Solution Approach 2:
The patent uses snapshot replication to create copies of application instances. Instead of launching new instances from scratch during scaling events, the system copies existing instance states through snapshots. This allows rapid restoration and scaling operations, transforming the slow cold-start process into a fast copy-and-restore operation.
2Reliability
If snapshots are created for each application instance (one-to-one snapshot), then instance accuracy is improved, but storage cost and management complexity increase
Solution Approach 1:
The system merges multiple instance snapshots into a single shared snapshot repository. Instead of maintaining separate snapshot files for each instance, the patent implements a consolidated snapshot management approach where snapshots are stored centrally and referenced by multiple instances. This dramatically reduces storage requirements while maintaining the ability to restore individual instances accurately.
Solution Approach 2:
The snapshot mechanism is designed to be universal and multi-functional. A single snapshot can serve multiple purposes: it can be used to restore the original instance, create scaled copies, or serve as a base for multiple instance recoveries. This universal snapshot approach eliminates the need for duplicate storage while maintaining instance accuracy.
3Speed
If snapshots are replicated for all instances (snapshot replication), then scaling speed is improved, but instance security and accuracy deteriorate due to shared state information
Solution Approach 1:
The system applies local quality by allowing snapshots to be shared at the repository level while maintaining instance-specific security controls. Each instance can have its own access permissions and security policies applied to its snapshots, even though the snapshots are stored in a shared location. This enables fast scaling through shared snapshot access while preserving instance security and accuracy through localized permission management.
4Speed
If application instances are kept running to enable quick restoration, then scaling responsiveness is improved, but resource consumption increases
Solution Approach 1:
The system implements dynamic instance state management where instances can transition between running, suspended, and snapshot states based on traffic conditions. Instead of keeping all instances permanently running, the patent dynamically adjusts instance states - maintaining only essential instances active while allowing others to be suspended or stored as snapshots. This dynamic approach enables quick restoration when needed while minimizing resource consumption during low-traffic periods.
Data Source
AI summary
A container-based application management method and apparatus are disclosed. A container-based serverless computing system is configured such that an application instance is allowed to be in one of an online state and a low-power state at runtime. In response to scaling down an application, at least one first application instance of the application in the online state is caused to enter the low-power state; and in response to scaling up the application, at least one second application instance of the application in the low-power state is caused to enter the online state. In this way, not only the cost of the application instance can be reduced, but also rapid elastic scaling can be performed on the application instance.


