Module 5 Lecture
Module 5 Lecture
Module 5 Lecture
Management
September, 2023
Agenda
• Key concept
• Azure App Service and Azure App Service plan
• Deployment
• Configuring Azure App Service
• Monitoring and diagnostic
• Azure Traffic Manager
• Azure Load balancer
• Azure Application Gateway
• Terraform modules
• Dynamic block Terraform
CONFIDENTIAL 2
• KEY CONCEPT
CONFIDENTIAL 3
Key concept
• Azure App Service enables you to build and host web apps,
mobile back ends, and RESTful APIs in the programming language
of your choice without managing infrastructure
• SLA - 99.95%
CONFIDENTIAL 4
Key concept
CONFIDENTIAL 5
• APP SERVICE AND APP SERVICE PLAN
CONFIDENTIAL 6
App service and app service plan
App Services:
• Windows Server VM + IIS Web app Logical app
• Linux VM + Tomcat
• Web apps, API apps, Mobile apps,
Logical apps, Function apps hosted on
the App Service Plan
Mobile app API app
• Load balanced
PaaS services:
• VMs abstracted by the platform and
run/updated by Azure
• VMs: the App Service Plan – what you
pay for
CONFIDENTIAL 7
App service and app service plan
PremiumV2
CONFIDENTIAL 8
App service and app service plan
Purpose?
App service plan: App service:
• scaling • application setting storage
• hosting • code execution
• DNS and SSL configuration
• capacity
• IIS web site management
App service plan • Virtual network integration (p2p)
App service
CONFIDENTIAL 9
Benefits of App Service plan pricing model
CONFIDENTIAL 10
Azure Logic Apps
Azure Logic Apps is a cloud service that helps you automate and orchestrate tasks,
business processes, and workflows when you need to integrate apps, data, systems,
and services across enterprises or organizations.
CONFIDENTIAL 11
Azure Logic Apps
Visual designer, allows spend less time coding and more time composing workflows
that help automate complex business processes
CONFIDENTIAL 12
Azure Function App
CONFIDENTIAL 13
• DEPLOYMENT
CONFIDENTIAL 14
Deployment options
Azure App Services include three main components of deploying to App Service:
- Deployment sources
A deployment source is the location of your application code. For production apps, the deployment
source is usually a repository hosted by version control software such as GitHub, BitBucket, or Azure
Repos.
- Build pipelines
A build pipeline reads your source code from the deployment source and executes a series of steps
(such as compiling code, minifying HTML and JavaScript, running tests, and packaging components)
to get the application in a runnable state.
- Deployment mechanisms
The deployment mechanism is the action used to put your built application into
the /home/site/wwwroot directory of your web app. The /wwwroot directory is a mounted storage
location shared by all instances of your web app.
CONFIDENTIAL 15
Deployment sources
- ZIP or WAR
- Use FTP
- Deploy continuously
- Use local Git
- Use Azure Pipelines
- Use GitHub Actions
- Run from package
CONFIDENTIAL 16
Deployment slots
This is feature in Azure App Service. It helps us to deploy different versions on different slots
depending on our needs, to swap them, to route a specific percentage of user traffic to one or more
of our deployment slots etc.
CONFIDENTIAL 17
• CONFIGURING WEB APPS
CONFIDENTIAL 18
Configuring Azure App Services
CONFIDENTIAL 19
Configuring Web Apps
--settings
Space-separated appsettings in KEY=VALUE format. Use @{file} to load from a file.
CONFIDENTIAL 20
Configuring Web Apps
CONFIDENTIAL 21
• MONITORING AND DIAGNOSTIC
CONFIDENTIAL 22
Monitoring and diagnostic
When you do run into issues with your web app, App Service diagnostics will point
out what’s wrong to guide you to the right information to more easily and quickly
troubleshoot and resolve the issue.
CONFIDENTIAL 23
Monitoring and diagnostic
Azure App Service provides built-in alerting functionality for web apps,
mobile back ends, and API apps in the Azure portal.
CONFIDENTIAL 24
Monitoring and diagnostic
Azure App Service provides built-in monitoring functionality for web apps, mobile
back ends, and API apps in the Azure portal.
CONFIDENTIAL 25
Kudo Panel
The Kudu Console is a tool that gives you both command line and file browser access to
your sites, all from the comfort of a web browser.
To access the Kudu Console, navigate to {yoursite}.scm.azurewebsites.net, and click
on Debug Console.
CONFIDENTIAL 26
AZURE TRAFFIC MANAGER
CONFIDENTIAL 27
Azure Traffic Manager
This service allows you to distribute traffic to your public facing applications across the
global Azure regions. Traffic Manager also provides your public endpoints with high
availability and quick responsiveness.
CONFIDENTIAL 28
AZURE LOAD BALANCER
CONFIDENTIAL 29
Azure Load Balancer
Azure Load Balancer operates at layer 4 of the Open Systems Interconnection (OSI)
model. It's the single point of contact for clients.
Load balancer distributes inbound flows that arrive at the load balancer's front end
to backend pool instances. These flows are according to configured load-
balancing rules and health probes.
The backend pool instances can be Azure Virtual Machines or instances in a Virtual
Machine Scale Set.
CONFIDENTIAL 30
Azure Load Balancer
A public load balancer can provide outbound connections for virtual machines (VMs)
inside your virtual network. These connections are accomplished by translating their private
IP addresses to public IP addresses. Public Load Balancers are used to load balance internet
traffic to your VMs.
An internal (or private) load balancer is used where private IPs are needed at the frontend
only. Internal load balancers are used to load balance traffic inside a virtual network. A load
balancer frontend can be accessed from an on-premises network in a hybrid scenario.
CONFIDENTIAL 31
AZURE APPLICATION GATEWAY
CONFIDENTIAL 32
Azure Application Gateway
Azure Application Gateway is a web traffic load balancer that enables you to manage traffic
to your web applications.
Traditional load balancers operate at the transport layer (OSI layer 4 - TCP and UDP) and
route traffic based on source IP address and port, to a destination IP address and port.
CONFIDENTIAL 33
Azure Application Gateway
Azure Application Gateway features:
CONFIDENTIAL 34
Azure Application Gateway
Azure Application Gateway features:
- Multiple-site hosting
With Application Gateway, you can configure routing based on host name or domain name for
more than one web application on the same application gateway.
- Redirection
A common scenario for many web applications is to support automatic HTTP to HTTPS redirection
to ensure all communication between an application and its users occurs over an encrypted path.
- Session affinity
The cookie-based session affinity feature is useful when you want to keep a user session on the
same server.
- Web socket and HTTP/2 traffic
Application Gateway provides native support for the WebSocket and HTTP/2 protocols. There's no
user-configurable setting to selectively enable or disable WebSocket support.
- Connection draining
Connection draining helps you achieve graceful removal of backend pool members during planned
service updates or problems with backend health.
- Custom error pages
Application Gateway allows you to create custom error pages instead of displaying default error
pages.
CONFIDENTIAL 35
TERRAFORM MODULES
CONFIDENTIAL 36
Terraform modules
Terraform modules are self-contained pieces of infrastructure-as-code that abstract the
underlying complexity of infrastructure deployments.
They speed adoption and lower the barrier of entry for Terraform end users who consume
pre-built configuration. As a result, they should use coding best practices such as clear
organization and the DRY ("Don't Repeat Yourself") principle wherever possible.
CONFIDENTIAL 37
Terraform modules
CONFIDENTIAL 38
DYNAMIC BLOCK TERRAFORM
CONFIDENTIAL 39
Dynamic Block Terraform
Dynamic blocks in Terraform are used to create multiple blocks of a certain type from a
complex data structure, such as a list or map. They provide a more flexible and efficient way
to manage resources, especially when dealing with a large number of similar resources or
configurations.
CONFIDENTIAL 40
Useful links
- Terraform on Azure
- Terraform modules
- Azure app service
- Azure App service plans
- Azure Load balancer
- Azure Traffic Manager
- Azure Application Gateway
CONFIDENTIAL 41
Thank you for attention
CONFIDENTIAL 42