## 7 The Global Scheduler  
When the request demand exceeds the capacity of a single invoker, a new invoker must be added to the system to prevent overloading, which could lead to SLA violations. Conversely, when the load decreases, some invokers should be removed to avoid overprovisioning and wasting resources. Therefore, scheduling decisions across multiple invokers become a scaling-in/out problem. Although live migration has been proposed as a solution to this issue, it is not suitable for integration with our buffer-aware scheduler. This is because, even when the hybrid predictor provides accurate forecasts, our scheduling decisions rely not only on invocation predictions but also on the expected buffer length, making live migration incompatible with our approach. To address the scaling problem in relation to the buffer-aware scheduler, we introduce a skewness-aware model designed to prevent both over- and under-provisioning of available resources. Skewness [32; 33] is a widely used metric for quantifying uneven resource utilization. We extend this concept to the FaaS environment, where it represents the imbalance in workload distribution across invokers. In our model, we develop a new measure called the \"skewness score,\" which guides scaling-in and scaling-out decisions. Let's assume that we have \(K\) types of resources (memory, CPU, storage), denoted as \(G=\{1,2,\ldots,K\}\). For each invoker, we calculate the skewness of resource \(k\) using the adjusted Fisher-Pearson coefficient of skewness as follows:  
\[\textit{Skewness}_{j\in G}=\frac{n}{(n-1)(n-2)}\times\frac{\sum_{i=1}^{n}(x_ {i}-\overline{x})^{3}}{\sigma^{3}} \tag{13}\]  
where: \(x_{i}\) is the resource \(k\) utilization (e.g., CPU%, memory GB, duration ms) at the \(i\)-th time point, \(\overline{x}\) is the mean utilization over time series \(n\) and \(\sigma\) is the sample standard deviation of the time series. Then we create a composite score for each available invoker that weights resource skewness, variability, and utilization as the Skewness Score \(S\) for invoker \(n\):  
\[S_{n}=\sum\limits_{j=1}^{k}\frac{\left|\textit{Skewness}_{j\in G}\right|\times \sigma_{j}}{\overline{x}_{j}} \tag{14}\]  
The skewness score serves as the primary indicator in the scaling process. A high score indicates greater skewness, suggesting that the invoker is more likely to experience resource starvation. Scaling decisions are made based on the skewness scores of all active invokers prior to routing the predicted incoming request. The skewness-aware algorithm (shown in Algorithm 2) computes the score for each available invoker, and the request is routed to the one with the lowest skewness score, representing the most balanced (i.e., stable) resource utilization. If all current invokers have reached full capacity and cannot handle additional requests, a new invoker is activated. In our experiments, we used three resource types to calculate the skewness score: CPU, memory, and execution duration. The hybrid model scheduling approach establishes a clear separation of concerns between the global and local tiers, connected through a coordinated feedback loop. The Global Scheduler focuses on infrastructure-level decisions, routing requests to invokers based on their skewness scores, which reflect resource imbalances. It does not track individual requests, ensuring that its complexity remains scalable and unaffected by the number of active requests. The Local Scheduler, guided by the Hybrid Predictor forecast, is responsible for assigning tasks to containers with the largest available buffer and proactively pre-warming containers. It also updates the invoker's resource state (CPU, memory, execution duration) and stores real-time resource metrics in the Invoker Info Table. Meanwhile, the Global Scheduler continuously monitors this table to recalculate skewness scores and adjust routing decisions accordingly.