Microsoft Azure is one of the fastest growing public cloud service providers in the market currently, and also holds the second highest market share after AWS. Azure has a sophisticated set of services that will help you build fault-tolerant and scalable cloud-based applications.
Hands-On Azure for Developers will take you on a journey through multiple PaaS services available in Azure, including App Services, Functions, and Service Fabric, and explain in detail how to build a complete and reliable system with ease. You will learn about how to maximize your skills when building cloud-based solutions leveraging different SQL/NoSQL databases, serverless and messaging components, and even search engines such as Azure Search. In the concluding chapters, this book covers more advanced scenarios such as scalability best practices, serving static content with Azure CDN, and distributing loads with Azure Traffic Manager.
By the end of the book, you will be able to build modern applications on the Azure cloud using the most popular and promising technologies, which will help make your solutions reliable, stable, and efficient.
Author(s): Kamil Mrzygłód
Publisher: Packt Publishing
Year: 2018
Language: English
Pages: 606
Cover
Title Page
Copyright and Credits
Dedication
About Packt
Contributors
Table of Contents
Preface
Chapter 1: Azure App Service
Technical requirements
Creating and deploying Azure App Service
Creating Azure App Service using the Azure Portal
Selecting Azure Web App from available services
Configuring an Azure web app
Creating an App Service Plan
Creating an Azure App Service using Visual Studio
Deploying Azure App Service using FTP
Deploying Azure App Service with user-level credentials
Deploying Azure App Service using app-level credentials
Downloading app-level credentials from the Azure Portal
Configuring WebDeploy in Visual Studio
Creating Azure App Services using Visual Studio Code
Working with different operating systems and platforms
Selecting an operating system
Selecting different platforms
Different App Service Plans and features
Dev/Test App Service Plans
Production App Service Plans
Isolated App Service Plans
Securing App Services using different security providers
Configuring authentication/authorization in the Azure Portal
Using Azure Active Directory to secure App Services
Using other authentication providers
Diagnostics and monitoring of App Services
The Overview blade
Metrics
Monitoring
Summary
Questions
Further reading
Chapter 2: Azure WebJobs
Technical requirements
Creating WebJobs
Creating and deploying WebJobs in Azure Portal
Creating an application in Visual Studio
Deploying a WebJob in the Azure Portal
Deploying WebJobs from Visual Studio
Working with the WebJobs SDK
Calling a job manually
Automatic triggers in WebJobs
Publish a job
Azure WebJobs limitations
Using different file types for WebJobs
Creating and deploying a Node.js application as a WebJob
Deploying a Node.js Azure WebJob from Visual Studio Code
Summary
Questions
Further reading
Chapter 3: Deploying Web Applications as Containers
Technical requirements
Working with AKS
Preparing an application
Container Registry and Kubernetes clusters
Pushing a Docker image to Azure Container Registry
Creating a Kubernetes cluster using AKS
Running, scaling, and updating an application in AKS
Solving problems with authentication
Scaling a cluster
Updating an application
Azure Container Instances
Creating and deploying an application and container
Pushing an image to Azure Container Registry
Deploying an application to ACI
Web App for Containers
Creating a web app hosted in a container
Deploying a custom application
Summary
Questions
Further reading
Chapter 4: Distributed Applications and Microservices with Service Fabric
Technical requirements
Understanding microservices
Monolith versus microservices
Microservice approach
Using different languages and frameworks
Scaling and updating services individually
Using well-designed interfaces and protocols
Dealing with state
Diagnosing and monitoring microservices
Containers, services, and actors in SF
Containers
Creating a cluster
Deploying a container
Packaging a service
Reliable services
Creating a SF application
Deploying an application to the cloud
Reliable actors
Creating a project with actors
Creating an actor's client
Communication between services
Creating a communication channel
Clusters in SF
Cluster security
Node-to-node security
Client-to-node security
Scaling
Scaling a cluster up or down
Monitoring and diagnostics
Application monitoring
Cluster monitoring
Health monitoring
Summary
Questions
Further reading
Chapter 5: Using Azure Search
Technical requirements
Creating an Azure Search service
Using Azure Portal
Full-text search in Azure Search
Sending a request
Linguistic analysis in full-text search
Analyzers in Azure Search
Analyzer selection
Indexing in Azure Search
Importing more data
Push model
Pull model
Cognitive search – adding AI to the indexing workload
Configuring Cognitive Search
Summary
Questions
Further reading
Chapter 6: Mobile Notifications with Notification Hub
Technical requirements
Reasons to use Notification Hub
Challenges for application design
Push notification architecture
Direct connection
Queued communication
Triggered communication
Registering devices in Notification Hub
Notification Hub device registration
Creating a Notification Hub
Registering in an application
Checking available registrations
Using installations
Sending a notification
Sending a test notification
Test notification in Azure Portal
Test notification in the SDK
Using the SDK to send a notification
Rich content notifications
Creating and sending a rich content notification
Summary
Questions
Further reading
Chapter 7: Serverless and Azure Functions
Technical requirements
Understanding Azure Functions
Being "serverless"
Responsibilities of cloud vendors
Pricing model
Azure Functions concepts
Function app
Functions
Triggers and bindings
Pricing models
Scaling
Scaling in the consumption model
Scaling in the App Service model
Configuring the local environment for developing Azure Functions
Starting with Azure Functions locally
Creating a function
Using Visual Studio
Using Azure Portal
Azure Functions features
Platform features
Security
Monitor
Host.json
Publish
Workflow in Azure Functions – Durable Functions
Orchestrations and activities
Orchestration client
Orchestration history
Timers
External events
Integrating functions with other services
Function file
Input/output bindings
Custom bindings
Summary
Questions
Further reading
Chapter 8: Integrating Different Components with Logic Apps
Technical requirements
What is Azure Logic Apps?
Azure Logic Apps – how it works
Azure Logic Apps – advantages
Connectors for Logic Apps
Connector types
Built-in connectors
Managed API connectors
On-premises connectors
Integration account connectors and enterprise connectors
Creating Logic Apps and integrating services
Creating Logic Apps in Azure Portal
Working with Azure Logic Apps in Visual Studio
B2B integration
Starting B2B integration in Azure Logic Apps
Summary
Questions
Further reading
Chapter 9: Swiss Army Knife - Azure Cosmos DB
Technical requirements
Understanding Cosmos DB
Creating a Cosmos DB instance in the portal
Using Azure Cosmos DB in Visual Studio
Pricing in Azure Cosmos DB
Partitioning, throughput, and consistency
Partitions in Azure Cosmos DB
Throughput in Azure Cosmos DB
Consistency in Azure Cosmos DB
CosmosDB data models and APIs
SQL
MongoDB
Graph
Table
Cassandra
Different features of CosmosDB
Account level throughput
Database level throughput
Firewall and virtual networks
Azure Functions
Stored procedures
User-defined functions and triggers
Summary
Questions
Further reading
Chapter 10: Reactive Architecture with Event Grid
Technical requirements
Azure Event Grid and reactive architecture
Reactive architecture
Topics and event subscriptions
Event sources
Event handlers
Topics and subscriptions
Connecting services through Azure Event Grid
Creating Azure Event Grid in Azure Portal
Azure Event Grid security
Creating a subscription
Publishing custom events to Azure Event Grid
Event gateway concept
Handling a custom event
Integrating Azure Functions with Azure Event Grid
EventGridTrigger in Azure Functions
Testing Azure Event Grid and Azure Functions
Summary
Questions
Further reading
Chapter 11: Using Azure Storage - Tables, Queues, Files, and Blobs
Technical requirements
Using Azure Storage in a solution
Different Azure Storage services
Different types of storage account
Securing Azure Storage
Replication
Storing data with Azure Storage Tables
Creating an Azure Storage service
Managing Table Storage
Storing data in Table Storage
PartitionKey
RowKey
Timestamp
General rules for entities
Querying data in Table Storage
Table API in Azure Cosmos DB
Implementing fully managed file shares with Azure Files
Azure Files concepts
Working with Azure Files
Blob Storage versus Azure Files
Queues in Azure Queue Storage
Queue Storage features
Developing an application using Queue Storage
Object storage solution – Azure Storage Blobs
Blob Storage concepts
Inserting data into Blob Storage
Containers and permissions
Blob Storage: additional features
Summary
Questions
Further reading
Chapter 12: Big Data Pipeline - Azure Event Hub
Technical requirements
Azure Event Hub service and concepts
Azure Event Hub concepts
Azure Event Hub durability
Working with Azure Event Hub
Creating an Azure Event Hub in the Azure portal
Working with Azure Event Hub in the portal
Developing applications with Azure Event Hub
Azure Event Hub security
Event publishers
IP filters
Azure Event Hub Capture feature
How Azure Event Hub Capture works
Enabling Event Hub Capture
Summary
Questions
Further reading
Chapter 13: Real-Time Data Analysis - Azure Stream Analytics
Technical requirements
Azure Stream Analytics introduction
Stream ingestions versus stream analysis
Azure Stream Analytics concepts
Input and output types
Create Azure Stream Analytics in Azure portal
Adding an input
Adding an output
Azure Stream Analytics query language
Writing a query
Event ordering, checkpoints, and replays
Event ordering
Checkpoints and replays
Summary
Questions
Further reading
Chapter 14: Enterprise Integration - Azure Service Bus
Technical requirements
Azure Service Bus fundamentals
Azure Service Bus versus other messaging services
Azure Service Bus and Azure Storage Queues
Azure Service Bus in Azure portal
Queues, topics, and relays
Queues
Topics
Relays
Azure Service Bus design patterns
Developing solutions with Azure Service Bus SDK
Azure Service Bus security
Managed Service Identity
RBAC
Advanced features of Azure Service Bus
Dead lettering
Sessions
Transactions
Handling outages and disasters
Disaster recovery
Handling outages
Summary
Questions
Further reading
Chapter 15: Using Application Insights to Monitor Your Applications
Technical requirements
Using the Application Insights service
Logging data in the cloud
Azure Application Insights fundamentals
Creating Azure Application Insights in the portal
Monitoring different platforms
.NET
Node.js
Azure Functions
Analytics module
Accessing the Analytics module
Application Insights automation
Alerts
Summary
Questions
Further reading
Chapter 16: SQL in Azure - Azure SQL
Technical requirements
Differences between Microsoft SQL Server and Azure SQL
Azure SQL fundamentals
Advanced Azure SQL features
SQL Server on VMs
Creating and configuring Azure SQL
Creating an Azure SQL instance
Azure SQL features in the portal
Security
Firewall
Advanced Threat Protection
Auditing
Dynamic Data Masking
Scaling Azure SQL
Single database
Elastic pool
Read scale-out
Sharding
Monitoring and tuning
Monitoring
Tuning
Summary
Questions
Further reading
Chapter 17: Big Data Storage - Azure Data Lake
Technical requirements
Understanding Azure Data Lake Store
Azure Data Lake Store fundamentals
Creating an Azure Data Lake Store instance
Storing data in Azure Data Lake Store
Using the Azure portal to navigate
Filter
New folder
Upload
Access
Files and folders
Microsoft Azure Storage Explorer
Using SDKs
Security
Authentication and authorization
RBAC
POSIX ACL
Network isolation
Best practices
Performance
Security
Resiliency
Data structure
Summary
Questions
Further reading
Chapter 18: Scaling Azure Applications
Technical requirements
Autoscaling, scaling up, scaling out
Autoscaling
Scaling up and scaling out
Scaling Azure App Services
Manual scaling
Autoscaling
Scaling Azure Functions
Scaling serverless applications
Scaling Azure Functions
Scaling Azure Service Fabric
Scaling a cluster manually
Using Azure SDK to scale your cluster
Summary
Questions
Further reading
Chapter 19: Serving Static Content Using Azure CDN
Technical requirements
Azure CDN fundamentals
Working with CDNs
Creating an Azure CDN in the portal
Optimization and caching
Configuring the endpoint
Compression
Caching rules
Geo-filtering
Developing applications with Azure CDN
Configuring Azure App Service with Azure CDN
Summary
Questions
Further reading
Chapter 20: Distributing Load with Azure Traffic Manager
Technical requirements
Azure Traffic Manager fundamentals
Functions of Azure Traffic Manager
Creating Azure Traffic Manager in the Azure portal
Routing method – performance
Routing method – weighted
Routing method – priority
Routing method – geographic
Routing method – MultiValue
Routing method – subnet
Working with Azure Traffic Manager in the Azure Portal
Configuration
Real user measurements
Endpoints
Monitoring
Nslookup
Traffic view
Summary
Questions
Further reading
Chapter 21: Tips and Tricks for Azure
Technical requirements
The Azure CLI and Cloud Shell
The Azure CLI
Cloud Shell
Locks
Creating and managing locks
Naming conventions
Finding the best naming convention
Resources in Azure
Azure Resource Explorer
Summary
Questions
Further reading
Assessments
Other Books You May Enjoy
Index