You are on page 1of 55

Develop Azure compute solutions – Virtual Machines

Hosting options for a web application

Publishing a .Net project onto a Windows server

ARM templates
Understanding the different components of a VM deployment when it comes
to ARM templates
Creating an image of a VM
Develop Azure compute solutions – Azure Web Apps and Azure
Functions

Azure App Configuration


Azure Web App Logging

› You get a set of logging features that are available for the Azure Web
App.

› The different types of logging that are available are

› Application Logging – This captures log messages that are generated by


your application code.

› Web server logging – This records raw HTTP request data.

› Detailed Error Messages – This stores copies of the .htm error pages
that would have been sent to the client browser.

› Deployment logging – These are logs when you publish content to an


application.

› You can also stream logs in real time.

Durable Functions
Azure Web App – CORS

Develop Azure compute solutions – Docker, Azure Container


Instances, Kubernetes

Docker Architecture
Installing Docker on a Linux VM
Run your Linux systems on your windows machines
When considering using Windows containers
The need for Azure container registry
Azure Container Instances

Understanding images
The Docker build command
You can use volumes to persist data

Docker compose
Azure Container Groups
Azure Container Instances – Connecting to file shares
Kubernetes
Azure Kubernetes Pods
Develop for Azure Storage

Azure Storage Accounts


Azure Blob versioning

› This feature allows you to maintain previous versions of an object.

› Here you can restore to an earlier version of a blob to recover data if it is


erroneously modified or deleted.

› For each subsequent modification of a blob, a newer version of the blob


is created.

› Here the blob versions are immutable. They can’t be modified.

› If you enable versioning, you can also disable it at any point in time. But
this does not delete existing blobs, versions, or snapshots

Use lifecycle rules to transition objects from one tier to another


Azure Blob snapshots

› This takes a read-only version of a blob at a particular point in time.

› You can also make use of the blob versioning feature. This provides a
better way to use a previous version of a blob.

› You can create as many snapshots as required of the blob.

› When you delete the blob, the snapshots also have to be deleted.

Azure Blob – Change Feed

› This feature provides transaction logs of all of the changes that occur to
the blobs and the blob metadata in the storage account.

› Here you get an ordered, guaranteed, durable, immutable and read-only


log of the changes.
› The changes events are recorded in the Apache Avro format
specification.

› This file format provides a compact way to store data. And also, a fast
way to access the data.

› Currently General Purpose v2 and Blob storage accounts support the


change feed feature.
Get locks for your objects with the help of blob leases

Azure Table storage


Azure Cosmos DB
Use Azure Cosmos DB as your NoSQL data store
Consistency levels
You can use synthetic keys for your partition key
Embedding data

Referencing data
Change Feed, stored procedures and triggers
Partitioning in Azure Cosmos DB

Time-to-live

› You can specify a time to live for all items in a container for just a
specific item.

› After the time to live setting is reached, the item will be deleted
automatically.

› The item will be deleted using the left-over request units.

› If there are no left-over request units, the deletion of the item will be
delayed.
› You can set the value of the time to live at the container or item level.

Implement Azure Security

Application Objects
Use Application Objects to represent your applications
Using Managed identities
This helps to securely access resources in Azure
Reference link -
https://docs.microsoft.com/en-us/dotnet/api/overview/azure/identity-
readme

The basics of authentication


Using the POSTMAN tool to access blob storage
OAuth

Getting the access token

Azure AD Group claims


Protecting your API’s
OAuth Implicit flow

Monitor, troubleshoot and optimize solutions

Application Insights

› Application Performance Management service for web developers.

› You can use this tool to monitor your applications.

› It can help developers detect anomalies in the application.


› It can help diagnose issues.

› It can also help understand how users use your application.

› It also helps you improve performance and usability of your application.

› How does it work

› You install a small instrumentation package within your application.

› You can see the statistics of your application locally in Visual Studio as
you run your application.

› You can also use the Application Insights resource in Azure to monitor
your application.

› What are the different aspects monitored by Application Insights

› Request rates, the response times and failure rates – This is done at the
page level.

› Exception recorded by your application.

› Page views and their load performance as reported from the user’s
browser.

› User and session counts.

› Performance counters of the underlying Windows or Linux Machines.

› Diagnostic trace logs from your application.

› Any custom events or metrics that the developer writes themselves in


the code.

› Understanding how your users use the application

› Funnels – You can create a funnel from one stage to another stage of
your application.

› You can then see how users are progressing through the stages of the
funnel.
› User Flows – This helps visualize how users navigate between pages in
your site. This can help answer question such as

– Does the user navigate away from a page on your site

– What do users click on a page on your site

– Where are the places where users churn most on your site

– Are there places where users repeat the same action over and
over

› Impact – This helps decide if a page is having an impact on your


application.

› It can help answer the question as to whether the page load time is
impacting how many people convert on a page in the application.

› Retention – This helps you understand how many users return to your
application.

› It can also help understand if users are able to perform certain tasks in
your application.

Azure Front Door Caching and Compression

By default, Azure Front Door has the capability to deliver large files. If a file is
large, it splits the file into chunks of 8 MB. If the file is not in the cache, the
large file is retrieved from the origin. Once the first 8 MB chunk is received , it
is sent to the user and then in parallel , the next 8 MB chunk is retrieved from
the origin.

Azure Front Door also supports compression. It supports all of the following
MIME types. But the file needs to be in size between 1 KB and 8 MB. It
supports both gzip and Brotli compression.

• "application/eot"
• "application/font"
• "application/font-sfnt"
• "application/javascript"
• "application/json"
• "application/opentype"
• "application/otf"
• "application/pkcs7-mime"
• "application/truetype"
• "application/ttf",
• "application/vnd.ms-fontobject"
• "application/xhtml+xml"
• "application/xml"
• "application/xml+rss"
• "application/x-font-opentype"
• "application/x-font-truetype"
• "application/x-font-ttf"
• "application/x-httpd-cgi"
• "application/x-mpegurl"
• "application/x-opentype"
• "application/x-otf"
• "application/x-perl"
• "application/x-ttf"
• "application/x-javascript"
• "font/eot"
• "font/ttf"
• "font/otf"
• "font/opentype"
• "image/svg+xml"
• "text/css"
• "text/csv"
• "text/html"
• "text/javascript"
• "text/js", "text/plain"
• "text/richtext"
• "text/tab-separated-values"
• "text/xml"
• "text/x-script"
• "text/x-component"
• "text/x-java-source"
Connect to and consume Azure and third-party services

Queues
The entire purpose of queues is to decouple components of your application
Azure Service Bus
In the PeekLock mode, you can mention what is the duration to lock messages

Messages that can’t be processed , can be taken from the dead-letter queue
You can also detect duplicate messages from Azure Service Bus queues
Understanding the different parts of a message
Azure Service Bus topics
Here subscribers can subscribe to get messages from the topic

Azure Service Bus Topic filters

› Subscriptions can use filters to decide on which messages they want to


receive.

› SQL Filters – Here you can use SQL-like conditions for the evaluation.
This can be done against the system or user defined properties.
› For system-defined properties , the properties must be prefixed with sys.

› Boolean filters – This is a TrueFilter or FalseFilter.

› Correlation Filters – Here conditions can be used to match against the


user’s or system properties.

› Note:- Correlation Filters process faster than SQL filters.

Difference when it comes to Azure storage queues and Service Bus queues

Azure Event Hubs


When you want to ingest large amounts of data , look towards using Azure
Event Hubs
When you send events or data onto Azure Event Hub, they are sent to a
partition. The receiver can then receive events via a consumer group
You can use the EventProcessor class to track the events which have been
consumed from Azure Event Hub

Recommendations when it comes to readers and partitions


Azure Event Grid
Capture events from various Azure resources with the use of Azure Event Grid

Use Azure Event Grid to capture events from an Azure storage account and
then use Azure functions as the endpoint to capture the events.
To debug your Azure Event Grid code from Visual Studio in Azure Functions,
make sure to use the ngrok tool
https://ngrok.com/

When working with Azure Event Grid, its important to know the schema. Here
you know the format of the data that is sent from Azure Event Grid
Reference - https://docs.microsoft.com/en-us/azure/event-grid/event-schema
Remember that if you have your own custom Webhook, then you need to have
the handshake code in place to take the validationcode and send it back to the
validationURL.

You can also create your custom topics


Comparison between the different messaging services

Some differences when it comes to Storage Blob triggers and Azure Event Grid
Azure Logic Apps
Helps you to build workflows in Azure

You might also like