Azure Virtual Machine Scale Sets 
                                    VMSS

Azure Virtual Machine Scale Sets VMSS

HOW TO CREATE VIRTUAL MACHINE SCALE SETS IN AZURE

Azure Virtual Machine Scale Sets VMSS

Azure Virtual Machine Scale Sets let you create and manage a group of load balanced VMs. The number of VM instances can automatically increase or decrease in response to demand or a defined schedule. Virtual machine scale sets is a collection of identical VMs that can automatically scale in or out based on demand or a defined schedule.

Virtual machine scale sets provides high availability and application resiliency by distributing VMs across availability zones or fault domains. It allows your application to automatically scale as resource demand changes. Virtual machine works at large scale, supporting up to 1000 VMs with flexible orchestration. These VM instances share the same base OS image and configuration, making it easy to manage hundreds of VMs without extra configuration tasks or network management.

Why Use Virtual Machine Scale Sets?

Consistent Configuration :When you have many VMs running your application, maintaining a consistent configuration across the environment is crucial. Virtual machine scale set ensures that all VM instances are created from the same base OS image and configuration

Automatic Scaling: Virtual machine scale set automatically adjusts the number of VM instances based on demand or predefined rules (e.g., CPU usage, memory demand, or network traffic).

Load Balancing: Virtual machine scale set leverages Azure load balancers for distributing traffic across VM instances.

High Availability: By spreading VMs across fault domains or availability zones, Virtual machine scale set provides high availability guarantees.

How to Create a Virtual Machine Scale Set?

You can create a Virtual machine scale set manually through the Azure portal or define rules for auto scaling based on resource usage.

To create a Virtual machine scale set, specify the region, availability zone, VM size, and other configuration settings.

Configure scaling policies (manual or custom) to adjust the Virtual machine scale set, capacity according to workload demand.

Monitor virtual machine instance, metrics, alerts, and activity logs to ensure optimal performance

In summary

VMSS simplifies managing multiple VMs, ensures consistency, and dynamically adjusts capacity to meet your application’s needs. It’s a powerful tool for building scalable and resilient applications in Azure!

STEP TO TAKE IN CREATING VMSS

1 Open your azure account and go to search bar.

2 Search for virtual machine scale sets and click on create machine scale set.

3 Create Resource group, select on region and your availability zone.

4 Scaling: Set your scaling sets by clicking on the scaling preferably and click on configure.

5 Scaling conditions: click on the pen.

6 Scale Mode: select the mode option that you want and configure it.

Click on save

7 Click on see all sizes and select the size

8 Administrator account

LOAD BALANCER

A load balancer is a crucial component in modern computing environments, especially for applications that need to handle high volumes of traffic.

A load balancer is a device or software solution that distributes network traffic dynamically across multiple servers (whether they are on-premises or in the cloud) to support an application. Think of it as an invisible facilitator sitting between the user and a group of servers. Its primary job is to ensure that all resource servers are used equally, improving reliability, availability, and overall performance

When to enable load balancing:

When your website experiences high traffic, a load balancer ensures that requests are evenly distributed among multiple servers. This prevents any single server from becoming overwhelmed and helps maintain performance and responsiveness.

High Availability: Load balancers enhance reliability by distributing traffic even during peak usage. If one server fails, the load balancer redirects requests to other healthy servers.

Scalability: Imagine a ticketing website when tickets for a popular event go on sale. Thousands of people simultaneously try to access the site. Without a load balancer, the site would struggle to handle the demand. But with load balancing, requests are efficiently directed to available servers, ensuring more customers can buy their desired tickets.

Security: Load balancing also contributes to security. By distributing traffic across multiple backend systems, it minimizes the attack surface and makes it harder to exhaust resources or saturate links.

Load Balancing distributing traffic across multiple servers enhances security and resilience.

Create a load balancer

Next to networking

Upgrading policy

Then click on next

Next to tag

Then Click On Review + Create

Go to overview and click on Instance for you to see your instances.

Click on each instance to see your region location.

Orchestration mode

Azure Virtual Machine Scale Sets (Virtual Machine Scale sets), orchestration mode refers to how VM instances within a scale set are managed

Orchestration is the coordination and management of multiple computer systems, applications and/or services, stringing together multiple tasks in order to execute a larger workflow or process. These processes can consist of multiple tasks that are automated and can involve multiple systems.

Type Of Orchestration

Uniform Orchestration

Uniform orchestration provides fault domain high availability guarantees when configured with fewer than 100 instances.

All instances are identical, and individual VMs are exposed via the Virtual Machine Scale Set VM commands.

Uniform orchestration provides fault domain high availability guarantees when configured with fewer than 100 instances.

Optimized for large-scale stateless workloads with identical instances.

Flexible Orchestration

orchestration mode is defined when you create the scale set and cannot be changed or updated later. Choose the mode that best aligns with your workload requirements!

Designed to achieve high availability at scale with either identical or multiple virtual machine type

Flexible orchestration provides a unified experience across the Azure VM ecosystem.

High availability guarantees (up to 1000 VMs) by spreading VMs across fault domains in a region or within an Availability Zone.

Applications mixing virtual machine types or Spot and on-demand VMs together

SCALING MODE AND SCALING IN POLICY

Scaling Mode
scaling mode refers to how resources are dynamically adjusted to meet demand. scaling mode determines how VM instances within a scale set are managed. It impacts how instances are created, scaled out, and scaled in.

Scale Policy:

A scale policy defines how an Auto Scaling group should adjust its capacity in response to specific conditions.

It includes rules for both scaling out (adding instances) and scaling in (removing instances).

You can create custom policies based on your application’s requirements. For example, a scale policy might specify: "If CPU utilization exceeds 80%, add 20 instances. ”If request count drops below 30%, remove 10 instances.” If request count drops below 30%, remove 10 instances. "Scale policies are essential for maintaining the right balance between resource availability and cost efficiency.