What is an Azure Spot Virtual Machines / Spot instance?
Azure Spot offers unused Azure capacity at a discounted rate versus pay-as-you-go prices. Azure can take capacity back whenever it needs, the Azure infrastructure will evict Azure Spot Virtual Machines.
The amount of available capacity can vary based on size, region, time of day, and more. When deploying Azure Spot Virtual Machines, Azure will allocate the VMs if there is capacity available,
there is no SLA for azure spot VMs.
Azure Spot Virtual Machine offers no high availability guarantees.
At any point in time when Azure needs the capacity back, the Azure infrastructure will evict Azure Spot Virtual Machines with 30 seconds' notice.
Eviction type:
Capacity only: evict virtual machine when Azure needs the capacity for pay as you go workloads. Your max price is set to the pay-as-you-go rate.
Price or capacity: choose a max price and Azure will evict your virtual machine when the cost of the instance is greater than your max price or when Azure needs the capacity for pay as you go workloads.
Eviction policy
VMs can be evicted based on capacity or the max price you set.
You can set the eviction policy to Deallocate (default) or Delete.
Azure may allow you to redeploy evicted VM's however there is no guarantee, you will still be charged when you choose to deallocate since storage is being used.
when we choose to Eviction policy to delete the underlying storage will also be removed So you will never be charged for the storage.
What is the difference between generation 1 and generation 2 VM's
generation 1 and generation 2 VM are now available in azure, you need to consider the generation of VM before it gets deployed, once VM is created you can't change a virtual machine's generation.
The main difference between azure VM gen1 and gen2 is boot architecture Generation 1 VM use BIOS-based architecture whereas Generation 2 VMs use the new UEFI-based boot architecture
we can extend/create OS disk up to 2TB in generation 1 VM's but disk can be extended/created beyond 2TB when we use generation 2
There is no cost difference between Gen1 and Gen2 VM's
An availability set is a logical grouping of VMs that allows Azure to understand how your application is built to provide for redundancy and availability. We recommended that two or more VMs are created within an availability set to provide for a highly available application and to meet the 99.95% Azure SLA. There is no cost for the Availability Set itself, you only pay for each VM instance that you create.
What is the fault domain?
there will be so many servers residing on data centers, all these servers will be placed on racks, each rack will have its own power supply and network switch we can call each rack a fault domain.
fault domain can fail at the same time and the root cause will same.
What is the updated domain?
The updated domain is a group of resources that can be maintained/rebooted at the same time. only one updated domain can be rebooted at a time. there will be 30 mins maintenance time difference between the two updated domains.
5. Availability options - Azure offers a range of options for managing availability and resiliency for your applications. Architect your solution to use replicated VMs in Availability Zones or Availability Sets to protect your apps and data from datacenter outages and maintenance events.
Availability options -
Availability Zone - Physically separate your resources within an Azure region.
Virtual machines scale set - Distribute VM's across zones and fault domains at scale.
Availability Set - Automatically distribute your VM's across multiple fault domains.
Availability Zone: You can optionally specify an availability zone in which to deploy your VM. If you choose to do so, your managed disk and public IP (if you have one) will be created in the same availability zone as your virtual machine.
Create availability set:
1. What is fault domain? - Virtual machines in the same fault domain share a common power source and physical network switch.
2. What is update domain? - Virtual machines in the same update domain will be restarted together during planned maintenance. Azure never restarts more than one update domain at a time.
6. Inbound port rules
Select which virtual machine network ports are accessible from the public internet. You can specify more limited or granular network access on the Networking tab.