A Distributed Systems Cluster Simulation Framework
General Guidelines:
● Create a GitHub Repository.
● Weekly progress according to the assigned problem statement must be pushed to
the repo, which will be considered during the evaluation.
● Each team's weekly progress update in the repository must be shown to the teachers
in class.
● Name the GitHub repository with the four SRNs in order and the project title.
Problem Statement:
Develop a lightweight, simulation-based distributed system that mimics core Kubernetes
cluster management functionalities. The system will create a simplified yet comprehensive
platform for demonstrating key distributed computing concepts
High Level Architecture
● Implement an API server that integrates key functionalities such as node
management, pod scheduling, and health monitoring.
● Nodes periodically send health signals for themselves
● To simplify the assignment, the system consists of a CLI/Web Interface that
communicates with an API Server (Central Control Unit), which manages the Cluster
Infrastructure composed of Nodes and Pods.
Sem – 6 (2025)
UE22CS351B: CLOUD COMPUTING (4-0-2-5-5)
API Server (Central Control Unit)
Design and implement the API Server, which manages the overall cluster operation. It
contains three key components:
● Node Manager: Tracks registered nodes and their statuses. Maintains information
about node resources (CPU cores) and availability.
● Pod Scheduler: Assigns pods to available nodes based on scheduling policies and
resource requirements.
● Health Monitor: Receives health signals from nodes and detects failures to ensure
system reliability.
check for availability:
● Nodes periodically send heartbeat signals to the API server.
● API server tracks node status and can detect node failures.
Nodes
● Nodes are computing units that host pods.
● When adding a new node to the system, you must launch a new container to
simulate the physical node in the cluster.
● Each node maintains an array list of pod IDs it hosts to simulate pod deployment.
● Periodically send health check signals for themselves to the API server.
Sem – 6 (2025)
Pods
UE22CS351B: CLOUD COMPUTING (4-0-2-5-5)
● Smallest deployable units, scheduled on nodes.
● Require specific CPU resources.
● Pods are simulated through entries in the node's pod ID array list.
Organizing Resources in the Cluster
Resources in the form of CPU cores need to be allocated across nodes. Each node
contributes resources to the cluster, and pods consume portions of these resources. The Pod
Scheduler helps map resource requirements to available node capacity.
Note on Pod Scheduling
In a Kubernetes-like system, pod scheduling is used to efficiently allocate workloads across
multiple nodes. Each pod has specific resource requirements CPU and the scheduler ensures
pods are placed on nodes with sufficient available resources. The purpose of scheduling is to
optimize resource utilization, ensure high availability, and maintain system performance.
For example, let's say you have a pod that requires 2 CPU cores, and your cluster has nodes
with varying resource capacities. The scheduler would find a node with at least 2 CPU cores
and place the pod there. Once scheduled, the pod ID is added to the node's array list of
pods.
Fault Tolerance
Implement mechanisms to handle Node failures. This could involve strategies like detecting
failed nodes through missed heartbeats and rescheduling pods from failed nodes to healthy
ones.
Client Interaction and Features
Develop a command line interface or a web interface to interact with the Kubernetes-like
system and perform the following actions:
Node Operations
These operations involve the Node Manager component of the API Server:
Sem – 6 (2025)
UE22CS351B: CLOUD COMPUTING (4-0-2-5-5)
● Add nodes to the cluster, specifying CPU cores (each addition requires launching a
new container).
● List all nodes and their health status.
Pod Operations
● Launch pods with specific CPU requirements.
Node Addition Process Flow
Here's an overview of how the node addition process works:
Node addition to cluster
Pod scheduling
Node health monitoring and failure recovery
Listing of Nodes in cluster along with their health status
Technology Stack
1.
2.
3.
Docker (For Simulating Nodes)
Flask, Node.js, or any other programming language for implementing an API server.
First-Fit, Best- Fit, Worst-Fit scheduling algorithm for pod Scheduling
Sem – 6 (2025)
UE22CS351B: CLOUD COMPUTING (4-0-2-5-5)
Further Enhancements
I'll help you build a distributed systems cluster simulation framework that mimics core Kubernetes functionalities. Let's design a solution that meets all the requirements while being educational and practical.
Let's start with a high-level architecture diagram:
For this project, I recommend:
Backend (API Server):
Frontend:
Node Simulation:
Database:
Let's break down the implementation by components:
Please make sure to add the following environment variables to your project:
Let me complete the implementation with the remaining components needed for the Kubernetes-like cluster simulation framework:
Now that we've completed the implementation, here's how to run the Kubernetes-like cluster simulation:
Make the setup script executable and run it:
chmod +x scripts/setup.sh
./scripts/setup.shStart the API server:
npm run start:serverIn a separate terminal, start the web interface:
npm run devAdding Nodes:
Launching Pods:
Monitoring the Cluster:
Testing Fault Tolerance:
The system implements multiple scheduling algorithms:
The project includes comprehensive documentation:
This implementation fulfills all the requirements specified in the problem statement and provides a solid foundation for further enhancements.
You can send messages while the preview loads