Lesson 4 of 6 Network Solutions

Improving Network Performance

This lesson explains how to improve performance inside Azure, between sites and for global users.

Learning outcomes

After completing this lesson, you will be able to:

  • Explain Accelerated Networking and proximity placement groups.
  • Identify features that improve hybrid performance.
  • Choose a performance feature for a stated problem.

Understanding the bottleneck

Optimization starts with identifying where time is lost. Latency between regions depends mainly on distance, and latency within a region depends on the proximity of machines. Throughput is limited by the smallest element in the path, such as a virtual machine size or a gateway SKU. Network Watcher tools and Connection Monitor measure latency and packet loss between endpoints, and Network Insights shows health across resources.

Inside Azure

Several features reduce latency between virtual machines.

Accelerated Networking

Accelerated Networking uses single-root I/O virtualization, so that a virtual machine's network traffic bypasses the host's virtual switch. It reduces latency, jitter and CPU use, and increases throughput. It needs a supported size with at least two vCPUs, and the machine must be stopped and deallocated before it can be enabled on an existing machine.

Proximity placement groups

A proximity placement group is a logical grouping that places virtual machines physically close together, reducing latency between them. It is a colocation constraint, and a group cannot span zones. It trades some availability for lower latency, and it suits tightly coupled tiers such as an application and its database, or SAP workloads.

Zones and placement

Traffic between zones has low latency, but higher than within a datacenter. Latency-sensitive tiers can be pinned to the same zone, using zonal deployment, and each zone can host a complete stack so that traffic stays within it. This is a design trade-off rather than a default, and it is often used by chatty applications.

VM sizes and throughput

Larger sizes have higher network bandwidth, and the size must match the required throughput. Some newer sizes use the Microsoft Azure Network Adapter (MANA), which requires suitable drivers.

True or false

Performance inside Azure

Exam skills 4.4.3

Check the features that reduce latency between virtual machines.

Log in to try this activity Interactive activities are free with an account.

Between sites

Hybrid performance depends on the connection. ExpressRoute gives predictable latency, and FastPath bypasses the gateway for improved throughput, though it does not apply to all traffic, such as traffic to spoke load balancers or PaaS. For users in remote regions, ExpressRoute Premium or Global Reach can carry traffic on the Microsoft backbone. VNet peering does not impose a gateway, so it offers better performance between virtual networks than a VPN between them.

Global users

Users far from a region experience latency that no server tuning can remove. Azure Front Door ends connections close to users, at more than 118 edge locations, and carries traffic to the origin across the Microsoft network, and also caches content. Cached content needs no trip to the origin at all, making it the most effective optimization for static files.

Traffic Manager can direct users to the region with the lowest latency, using DNS. Deploying the workload in additional regions is the final step, as it places compute near users, and data must follow, as discussed in the Cosmos DB and caching lessons.

Comparing the options

The following table recaps the performance features by the problem each one solves.

ProblemFeature
High host CPU and jitter for network trafficAccelerated Networking
Latency between two tiers of machinesProximity placement group
Gateway limiting hybrid throughputExpressRoute FastPath
Slow pages for distant usersAzure Front Door with caching
Routing users to the fastest regionTraffic Manager performance routing or Front Door

The following diagram compares the placement of two chatty application tiers before and after the change.

Reducing latency between two chatty tiers. Before, the trading application and its in-memory database sat in zones 1 and 2, crossing zones thousands of times per request. After, a proximity placement group in one zone keeps them physically close, and Accelerated Networking reduces host processing and jitter.
The scenario is illustrative.
Match the pairs

Performance problem and feature

Exam skills 4.4.3

Match each performance problem with the feature that solves it.

Log in to try this activity Interactive activities are free with an account.
Worked example

Reducing latency

A trading application and its in-memory database run on separate virtual machines across zones 1 and 2, and they exchange thousands of small messages per request. Response times are too slow. A two-zone design is not required, because the application is restartable within minutes. What should you recommend?

The problem is latency between tiers, and availability across zones is not required. Placing both machines in a proximity placement group, in one zone, puts them physically close, and enabling Accelerated Networking reduces host processing and jitter.

Azure Front Door improves latency between users and an application, not between two tiers inside a region. A larger gateway has no effect on traffic inside a virtual network. Moving machines to different regions would make latency much worse.

Check yourself

Can one proximity placement group span two availability zones?

Show answer

No. A group places machines physically close, so it cannot span zones.

Exam Tips

Remember for the exam

  • Accelerated Networking bypasses the host's virtual switch; it needs a deallocated VM to enable.
  • A proximity placement group reduces latency, but cannot span zones.
  • FastPath bypasses the ExpressRoute gateway in the data path.
  • Front Door brings the network and caching close to global users.