Abstract
Cloud-native applications are increasingly becoming popular in modern software design. Employing a microservice-based architecture into these applications is a prevalent strategy that enhances system availability and flexibility. However, cloud-native applications also introduce new challenges, such as frequent inter-service communication and the complexity of managing heterogeneous codebases and hardware, resulting in unpredictable complexity and dynamism. Furthermore, as applications scale, only limited research teams or enterprises possess the resources for large-scale deployment and testing, which impedes progress in the cloud-native domain. To address these challenges, we propose CloudNativeSim, a simulator for cloud-native applications with a microservice-based architecture. CloudNativeSim offers several key benefits: (i) comprehensive and dynamic modeling for cloud-native applications, (ii) an extended simulation framework with new policy interfaces for scheduling cloud-native applications, and (iii) support for customized application scenarios and user feedback based on Quality of Service (QoS) metrics. CloudNativeSim can be easily deployed on standard computers to manage a high volume of requests and services. Its performance was validated through a case study, demonstrating higher than 94.5% accuracy in terms of response time. The study further highlights the feasibility of CloudNativeSim by illustrating the effects of various scaling policies.
Introduction
Modern software development has shifted from monolithic blocks to "cloud-native" architectures composed of hundreds of interconnected microservices. While this improves flexibility and availability, it introduces massive complexity: frequent inter-service communication (RPCs), heterogeneous hardware, and highly unpredictable traffic patterns.
For researchers, the primary hurdle is accessibility. Testing a new scheduling algorithm or scaling policy at scale typically requires a massive physical data center. Existing simulators often struggle with the "many-to-many" relationships inherent in microservices—where one service maps to many instances—and fail to capture the dynamic "cascade" of requests that occur when one service calls another.
Comparative Landscape
CloudNativeSim was developed to bridge the gap between traditional cloud simulators and the specific requirements of microservice architectures. As shown in the comparison below, while tools like CloudSim and iFogSim excel in datacenter configuration or edge modeling, they often lack the comprehensive suite of features—such as service chain modeling and horizontal/vertical scaling—required for modern cloud-native research.
System Architecture
Built on top of the CloudSim 3.0 core, CloudNativeSim introduces several novel components specifically for the microservice era. The toolkit is organized into a layered architecture designed for modularity and ease of use.
Key Components
- RpcCloudlet: Unlike traditional simulators that use static task definitions, CloudNativeSim uses a "dynamic derivation" mechanism. When a service is invoked, it spawns new "child" cloudlets on the fly, accurately mimicking how gRPC or REST calls propagate through a system.
- DAG-based Service Graph: It models service dependencies as a Directed Acyclic Graph (DAG). This allows the simulator to track parallel execution chains and identify the Critical Path—the specific sequence of service calls that determines the total response time.
- Layered Organization:
- User Layer: Handles file-based registration (JSON/YAML) to manage complex configurations easily.
- Event Layer: Manages the core discrete-event logic including allocation, scaling, and dispatching.
- Entity Layer: Models physical and logical components such as Pods, Containers, VMs, and Nodes.
- Simulation Core: The underlying engine based on CloudSim.
Validation and Results
The authors validated the simulator using SockShop, a popular microservice-based e-commerce benchmark. When compared against a physical 10-node cluster, CloudNativeSim achieved a response time simulation accuracy between 94.5% and 99.46%.
Beyond accuracy, the simulator demonstrates remarkable efficiency. A standard 16-core PC can simulate over 10 million objects (requests, services, instances) in under 10 seconds. This effectively "democratizes" large-scale cloud research, allowing researchers to evaluate complex scaling policies without expensive hardware. For instance, the study showed that Horizontal Scaling (HS) reduced resource usage by approximately 70% compared to a "No Scaling" baseline under high load.
Conclusion
CloudNativeSim provides a high-fidelity, accessible platform for modeling the complex dynamics of microservices. While current limitations include basic network traffic modeling and a lack of edge mobility support, future work aims to integrate the toolkit with container orchestration platforms like Kubernetes for even more realistic deployment testing.
Summary updated