Reader small image

You're reading from  Hands-On Cloud Administration in Azure

Product typeBook
Published inOct 2018
PublisherPackt
ISBN-139781789134964
Edition1st Edition
Tools
Right arrow
Author (1)
Mustafa Toroman
Mustafa Toroman
author image
Mustafa Toroman

Mustafa Toroman is a solution architect focused on cloud-native applications and migrating existing systems to the cloud. He is very interested in DevOps processes and cybersecurity, and he is also an Infrastructure as Code enthusiast and DevOps InstituteAmbassador. Mustafa often speaks at international conferences about cloud technologies. He has been an MVP for Microsoft Azure since 2016 and a C# Corner MVP since 2020. Mustafa has also authored several books about Microsoft Azure and cloud computing, all published by Packt.
Read more about Mustafa Toroman

Right arrow

Azure App Service - Hosting Web Applications without a Server

The next step in our cloud journey is PaaS, and we'll introduce Azure App Service. Azure App Service is the simplest example of Azure PaaS, and is intended to host web applications. We'll see how different hosting applications in IaaS and PaaS is.

In this chapter, we will cover the following:

  • Azure App Service Plans
  • Azure Web Apps
  • Traffic Manager
  • App service environment

Technical requirements

For this chapter, you'll need an Azure subscription.

Azure App Service Plan and Azure Web Apps

PaaS in Azure (or in any public cloud) is more abstract than IaaS. It's simple to understand the IaaS model because it's not much different from on-premises: we create a virtual machine, we configure it any way we want, we install anything we want (of course, limited by the OS itself; we can't install something that wouldn't run on-premises either).

After we create our Azure VM, we have complete control over everything on that VM. For example, the VMs created in the previous chapter were intended to be used as web servers. We can connect to that VM and install all the required roles, features, and software in order to start hosting our application.

But what if we want to do a similar thing with PaaS?

An Azure App Service Plan is used to host our web applications in Azure. We need to create an Azure App Service Plan...

Managing Azure Web App

After the deployment of resources is completed, we need to configure them. As we don't have direct access and can't install software, roles, or features, we have an extended set of preconfigured settings that we can edit. There are more options in the App Service blade than in the Virtual Machine Blade, but overall we have fewer options as direct configuration isn't available.

Let's start with the Azure Web App and continue with configuration.

Azure Web App deployment settings

The first set of options available for an Azure Web App is deployment. Quickstart offers us links to various documents and guides.

We can set the Deployment credentials that will be used for deployment and...

Monitoring a Web App in Azure

The default options for monitoring Azure Web Apps can be useful, but it's only the beginning of the Web App monitoring options. If you want a really powerful tool for monitoring and alerting with dashboards and analytics, Application Insights is the tool you want to use. Application Insights can be created and linked to a Web App while creating the Web App or later.

Also, you can use a single Application Insight to monitor multiple Azure Web Apps. It's interesting that Application Insights is not limited to Azure Web Apps, but can be used with an application hosted anywhere, including other cloud providers or an on-premises data center.

Application Insights

A first look at Application...

Azure App Service Plan

In the process of creating an Azure Web App, we needed to create an Azure App Service Plan. Let's take a step back and go over the settings available in the Azure App Service Plan.

Under SETTINGS, we have some options that are available in Azure Web Apps, such as Networking, Scale up (App Service plan), and Scale out (App Service plan). Properties, Locks, and an Automation script are available as well, as in all other Azure resources. Note that an App Service Plan can host multiple Azure Web Apps. Billing is done for an Azure App Service Plan; you don't pay per Web App. So, tier changes on an Azure Web App are directly connected to tier changes in the Azure App Service Plan. Scale up/down and scale in/out operations done in the Web App blade will be shown here as the tier will not change for the Azure Web App, but for the Azure App Service Plan...

Azure Web App high availability

We have already seen how to set up automatic scaling for Azure Web Apps and how to create scale in and out rules. But scaling can improve performance and keep the application up if there is an increase in requests and doesn't really secure the high availability of the application. If there is an issue in the Azure Data Center where the application is located, or maintenance on the host is in progress, the application will be unavailable if hosted in a single location.

In order to achieve high availability, we need to introduce another Azure service: Traffic Manager. Azure Traffic Manager operates on the DNS level to direct incoming requests to endpoints based on custom routing rules.

Let's start with creating a new Azure Traffic Manager and go through the configuration to show how to set up high availability for Azure Web Apps.

...

Running Azure Web Apps in a dedicated environment

Azure Web Apps use public endpoints and are usually accessed over the internet without any restrictions. In a case where more isolated access is needed, there is another option: Azure App Service Environment (ASE). Azure ASE offers a fully isolated and dedicated environment for secure applications at high scale. Azure ASE is usually used with workloads that require very high scale, isolated and secure network access, and high memory utilization. As ASE comes as a dedicated environment, this eliminates the problem of noisy neighbors (performance issues that may result from another application sharing the same host) and allow you to fully utilize all resources.

An Azure App Service Plan can be connected to an Azure VNet, but this requires additional work. On other hand, ASE comes automatically connected to a VNet and can be accessed...

Summary

An Azure App Service Plan is the best example of the PaaS model in Microsoft Azure. It allows us to host applications without servers and virtual machines. Even though management options are simplified and cut down to the minimum, we still have a lot of configuration options. Legacy support is next to nothing, but the PaaS model is intended for modern applications that require the latest features and frameworks. If you need to run legacy software, IaaS is the best choice.

We introduced IaaS and PaaS in Azure from the application perspective. But the application is nothing without data. In the next chapter, we'll move to Data Platform in Azure and show how to create and manage databases in the cloud.

Questions

  1. Azure App Service is...
    1. IaaS
    2. PaaS
    3. SaaS
  2. How much control do we have with an App Service Plan compared to virtual machines?
    1. More
    2. Less
    3. The same
  3. How much administration do we have with an Azure App Service Plan compared to virtual machines?
    1. More
    2. Less
    3. The same
  1. An App Service Plan is used to host...
    1. Web applications
    2. Databases
    3. Both
  2. Slots are used to...
    1. Host different version of the application
    2. Host the application in different regions
    3. Handle increased workload
  3. An Azure App Service Plan's increased workload is handled by...
    1. Scaling up
    2. Scaling out
    3. WebJobs
  4. The best monitoring tool for Azure Web Apps is...
    1. Splunk
    2. Log analytics
    3. Application Insights
  5. High availability for Azure Web Apps is achieved by...
    1. Scaling up
    2. Scaling out
    3. Traffic Manager
  6. Traffic Manager supports...
    1. Azure endpoints
    2. External endpoits
    3. Both
  7. An isolated and dedicated environment...
lock icon
The rest of the chapter is locked
You have been reading a chapter from
Hands-On Cloud Administration in Azure
Published in: Oct 2018Publisher: PacktISBN-13: 9781789134964
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 $15.99/month. Cancel anytime

Author (1)

author image
Mustafa Toroman

Mustafa Toroman is a solution architect focused on cloud-native applications and migrating existing systems to the cloud. He is very interested in DevOps processes and cybersecurity, and he is also an Infrastructure as Code enthusiast and DevOps InstituteAmbassador. Mustafa often speaks at international conferences about cloud technologies. He has been an MVP for Microsoft Azure since 2016 and a C# Corner MVP since 2020. Mustafa has also authored several books about Microsoft Azure and cloud computing, all published by Packt.
Read more about Mustafa Toroman