Reader small image

You're reading from  Hands-On Azure for Developers

Product typeBook
Published inNov 2018
PublisherPackt
ISBN-139781789340624
Edition1st Edition
Tools
Right arrow
Author (1)
Kamil Mrzygłód
Kamil Mrzygłód
author image
Kamil Mrzygłód

Kamil Mrzygłód is a technical lead and technology advisor, working with multiple companies on designing and implementing Azure-based systems and platforms. He's a former Microsoft Azure Microsoft Most Valuable Professional (MVP) and certified trainer, who shares his knowledge via various channels, including conference speeches and open source projects and contributions. Kamil lives in Poland with his two cats and one dog, dedicating some of his time to video games, cooking, and traveling.
Read more about Kamil Mrzygłód

Right arrow

Scaling Azure Applications

We cannot talk about reliable and stable applications in the cloud without scaling. While this process may have seemed a bit complicated and cumbersome in models like Infrastructure as a service (IaaS) or on-premises, Azure gives many different ways to multiply our applications quickly, and without downtime.

The following topics will be covered in this chapter:

  • Autoscaling, scaling up, scaling out
  • Scaling Azure App Services
  • Scaling Azure Functions
  • Scaling Azure Service Fabric

Technical requirements

To perform exercises from this chapter, you will need the following:

  • Access to an Azure subscription

Autoscaling, scaling up, scaling out

The cloud is all about scaling—it is one of the most important advantages of such a setup over an on-premises setup. The ability to rapidly adapt to new demands when it comes to incoming traffic, and the flexibility a cloud offers, enables you to create more stable services, which are less prone to unexpected load spikes and insufficient hardware performance. In this chapter, we will focus a little bit on diving deeper into the scaling topic, in order to build a deep understanding of how different services behave in Azure, and how you can ensure that the scaling feature is automated and requires as little attention as possible.

Autoscaling

You can define the autoscaling feature of...

Scaling Azure App Services

We started our journey through Microsoft Azure by learning some basics of Azure App Services. This is a very common PaaS component, which is widely used amongst many Azure users, both for very simple websites and complex systems requiring high performance and reliability. To make sure that your Web App is always on, or to check if it is under pressure, you have to implement some kind of scaling rules. When it comes to this service, you have two optionseither using manual scaling (and implementing some kind of alert, so that you know when such action should happen), or an autoscale feature, which makes things much easier in terms of maintenance. In this section, we will cover and compare both of them.

Manual scaling

...

Scaling Azure Functions

When using PaaS services, you can configure how your application will behave when CPU utilization hits the maximum allowed value, or the number of requests exceeds the threshold. However, Azure offers services in other models—one of the most interesting is serverless architecture, which abstracts the control even more in favor of easier configuration, minimum maintenance, and ability to focus on delivering a business value.

In this section, you will see the differences between Azure App Services and Azure Functions when it comes to scaling, both from the technical and conceptual point of view.

Scaling serverless applications

When you are using serverless services (such as Azure Functions, Azure...

Scaling Azure Service Fabric

We have discussed two different models for scaling by working with two separate Azure services; Azure App Services and Azure Functions.

They are quite different when it comes to adding new instances or improving hardware performance, in that they introduce multiple concepts, and offer a different level of flexibility. In the last section of this chapter, we will cover one more service, Azure Service Fabric. This particular Azure product behaves in a slightly different manner when it comes to scaling up or out, as it requires you to manage VMs. In addition, a distinct set of skills is necessary to perform this operation seamlessly and in the right fashion.

Scaling a cluster manually

Clusters in...

Summary

In this chapter, we covered the scaling of three completely different services—Azure App Service, Azure Functions, and Azure Service Fabric. You saw how this operation works for different application models—sometimes you scale service instances, VMs, or simply you do not control it and let the runtime do it for you. In fact, scaling services in the cloud is much easier than when using your own servers. You do not have to reconfigure load balancers, firewalls, routers, and servers. When using the scaling feature, always try to automate the process—manual scaling works only for very simple scenarios, and tends to keep your servers underutilized.

In the next two chapters, we will cover two additional Azure services, Azure CDN and Azure Traffic Manager, which help in keeping your applications available, even under heavy load.

...

Questions

  1. What is the difference between scaling up and scaling out?
  2. What are the use cases for scaling out?
  3. Is scaling up available in serverless services?
  4. Does scaling out in Azure App Services affect the pricing of the service?
  5. Why can scaling operation be dangerous in Azure Service Fabric?
  6. What are the cons of manual scaling?
  7. What do you do if you want to automatically scale your Azure App Service when CPU utilization reaches 80%?
lock icon
The rest of the chapter is locked
You have been reading a chapter from
Hands-On Azure for Developers
Published in: Nov 2018Publisher: PacktISBN-13: 9781789340624
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $19.99/month. Cancel anytime

Author (1)

author image
Kamil Mrzygłód

Kamil Mrzygłód is a technical lead and technology advisor, working with multiple companies on designing and implementing Azure-based systems and platforms. He's a former Microsoft Azure Microsoft Most Valuable Professional (MVP) and certified trainer, who shares his knowledge via various channels, including conference speeches and open source projects and contributions. Kamil lives in Poland with his two cats and one dog, dedicating some of his time to video games, cooking, and traveling.
Read more about Kamil Mrzygłód