Chapter 2: Term-End Examination, Dec, 2022
MCS-227: CLOUD COMPUTING AND Iot
Time: 3 Hours
Maximum Marks: 100
Weightage: 70
Note: Question No. 1 is compulsory. Answer any three Questions from the rest.
1. (a) What is resource provisioning in cloud computing? Explain the static and dynamic approaches of resource provisioning. Mention their advantages and disadvantages. 10
Ans: Resource Provisioning in cloud computing refers to the process of allocating and managing computational resources (such as CPU, memory, storage, and network bandwidth) to applications or services in a cloud environment. The goal is to ensure that applications have the necessary resources to function efficiently and meet performance requirements while optimizing resource utilization and costs.
Static and Dynamic Approaches of Resource Provisioning
Static Resource Provisioning:
In static resource provisioning, resources are allocated based on predefined requirements or estimates that do not change dynamically. The resources are provisioned for a specific workload or application in advance, often based on peak usage predictions. This approach is typically used when the workload is predictable and does not vary significantly over time.
Advantages:
- Simplicity: Static provisioning is straightforward to implement and manage since resources are allocated based on fixed requirements.
- Predictability: Because resources are provisioned based on known requirements, there is little variability in resource availability, making it easier to ensure consistent performance.
- Cost Predictability: Fixed resources mean costs are easier to predict and manage, as the resource usage does not fluctuate.
Disadvantages:
- Resource Underutilization: If the allocated resources exceed the actual demand, it can lead to underutilization and wasted resources, increasing costs unnecessarily.
- Inflexibility: Static provisioning lacks the flexibility to handle unexpected spikes in demand, potentially leading to performance issues or service degradation.
- Scalability Issues: In environments with fluctuating workloads, static provisioning may not scale effectively, requiring manual adjustments or over-provisioning to handle peak loads.
Dynamic Resource Provisioning:
Dynamic resource provisioning, also known as elastic provisioning, involves the automatic allocation and deallocation of resources based on real-time demand. Resources are adjusted dynamically to match the current workload, allowing for more efficient use of cloud resources. This approach leverages cloud features like autoscaling to adapt to changing requirements.
Advantages:
- Optimal Resource Utilization: Resources are allocated based on actual demand, reducing waste and ensuring that resources are used efficiently.
- Scalability: Dynamic provisioning allows for seamless scaling up or down in response to workload changes, ensuring that applications can handle varying loads without manual intervention.
- Cost Efficiency: By only using the resources that are needed, dynamic provisioning can lead to significant cost savings compared to static provisioning.
- Improved Performance: Applications can maintain performance levels even during unexpected demand spikes because resources are provisioned in real-time.
Disadvantages:
- Complexity: Dynamic provisioning is more complex to implement and manage, requiring sophisticated monitoring, automation, and orchestration tools.
- Latency: There may be a slight delay in resource allocation as the system adjusts to changing demands, which can affect performance if not managed correctly.
- Cost Unpredictability: While dynamic provisioning can reduce costs, the variability in resource usage can make it difficult to predict overall expenses, especially in highly variable workloads.
Both approaches have their specific use cases, and the choice between them depends on the nature of the application, workload variability, and organizational priorities regarding cost, performance, and management complexity.
(b) Define Load Balancing. Explain the following algorithms with reference to load balancing: 10
(i) Static algorithm approach
(ii) Weighted Round Robin
Ans: Load Balancing is a technique used in distributed computing and cloud environments to distribute workloads evenly across multiple servers or resources. The primary goal of load balancing is to ensure that no single server or resource is overwhelmed by too much work, which could lead to performance degradation or failure. Load balancing helps to optimize resource use, maximize throughput, minimize response time, and avoid overload of any single resource.
Load Balancing Algorithms
(i) Static Algorithm Approach
In the static algorithm approach, load balancing decisions are made based on predefined criteria and do not change dynamically in response to the current system state. The static algorithms allocate the load to servers or resources at the start of the process and do not adjust the allocation based on changes in workload or system performance.
Examples of Static Algorithms:
Round Robin: In this algorithm, requests are distributed evenly across all available servers in a circular order. Each server gets the next request in line, regardless of the server's current load or performance.
Random Allocation: In this approach, incoming requests are assigned to servers randomly without considering their current load or capacity.
Advantages:
- Simplicity: Static algorithms are easy to implement and understand, requiring minimal computational overhead.
- Predictability: Since the load distribution is pr