Monday 1 July 2019

Exercise - Scale up

Exercise - Scale up

Sandbox activated! Time remaining: 
Choose which platform you want to run in the cloud
Your web server is up and running, but you realize you need more computing power to make the experience great for your users. How can you make your VM run faster?
In your data center, you might move your web server to more powerful hardware to solve performance problems. The problem is you need to buy, rack, and power your new system. With Azure, the answer is much simpler.
Before you scale up your VM to a more powerful size, let's first define what scale means.
 Important
This exercise uses the virtual machine (VM) you created in the Exercise - Create a virtual machine unit. Please make sure you've completed that exercise before continuing.

What is scale?

Scale refers to adding network bandwidth, memory, storage, or compute power to achieve better performance.
You may have heard the terms scaling up and scaling out.
Scaling up, or vertical scaling, means to increase the memory, storage, or compute power on an existing virtual machine. For example, you can add additional memory to a web or database server to make it run faster.
Scaling out, or horizontal scaling, means to add extra virtual machines to power your application. For example, you might create many virtual machines configured in exactly the same way and use a load balancer to distribute work across them.
 Tip
The cloud is elastic. You can scale down or scale in your deployment if you needed to scale up or scale out only temporarily. Scaling down or scaling in can help you save money.

Azure Advisor and Azure Cost Management are two services that help you optimize cloud spend. You can use these services to identify where you're using more than you need, and then scale back to the capacity you're actually using.

Scale up your VM

Recall that you specified the size Standard_DS2_v2 when you created your VM. Your VM currently has two virtual CPUs and 7 GB of memory.
Let's bump up to the next size, Standard_DS3_v2. Your VM will then have four virtual CPUs and 14 GB of memory.


  1. From Cloud Shell, run az vm resize to increase your VM's size to Standard_DS3_v2.
    Azure CLI
    az vm resize \
      --resource-group Learn-8eb73ca3-d5f2-4ee1-89c5-cdcd999a132a \
      --name myVM \
      --size Standard_DS3_v2
    
    The update process takes about a minute. Your VM restarts during the process.
  2. Run az vm show to verify that your VM is running the new size.
    Azure CLI
    az vm show \
      --resource-group Learn-8eb73ca3-d5f2-4ee1-89c5-cdcd999a132a \
      --name myVM \
      --query "hardwareProfile" \
      --output tsv
    
    You see your new VM size, Standard_DS3_v2.
    output
    Standard_DS3_v2
    

No comments:

Post a Comment