One line of code. Seven stops.
What really happens between await http.GetAsync(...) and the JSON landing back in your app.
What you'll learn
- The seven stops every HTTP call to an Azure API makes, and what each one costs
- Why the first call is slow: 100 of the 160 ms is DNS and the TLS handshake, before your code runs
- Why new HttpClient() in a loop pays that cost forever, and IHttpClientFactory pays it once
Share this passage
Drawing…
Understand it one step at a time
The short runs these in order in about 64 seconds. Here they are written out — pick any step to jump the short straight to it.
One line of code
You call an API with one line of code and get JSON back. Between those two moments, seven separate hops actually happen.
Frequently asked questions
- Why is the first call to an Azure API so much slower than the rest?
- Most of that latency — around 100 of a roughly 160 ms first call — is DNS resolution and the TLS handshake, both of which happen before any of your code runs. Once the connection exists, later calls skip straight past that cost.
- Why does new HttpClient() in a loop hurt performance?
- It pays the DNS-and-TLS setup cost on every single call instead of once. IHttpClientFactory reuses the underlying connection, so that cost is paid once and every subsequent request is faster.
Free app · no app store
These are built for a phone
Every short is drawn at full portrait height, the shape a phone already is. Installed, it opens full-bleed with no address bar across the top — and the whole library reads offline.
Read deeper on Azure
Twenty seconds gets the shape of an idea across. These go into how it behaves in production.
-
How Azure Protects a Mobile App: The Full Request Flow, Layer by Layer
Front Door, your API, Microsoft Entra ID, authorization and a private database — the five layers that stand between a mobile app and its data on Azure.
-
Your Mobile App Is Leaking Its API Key — and Obfuscation Will Not Save It
An APK or IPA is a zip file. Anything hardcoded inside it, including your API key, is already public — and here is how to get it off the phone for good.
-
What Is Microsoft Foundry (Azure AI Foundry)? The Services, and When You Actually Need Them
A plain tour of Microsoft Foundry for developers: the resource, projects, models, agents, tools, and when Azure OpenAI on its own is enough.
More shorts
-
Azure
Secure a Mobile API in 5 Steps
8 steps · 25s
-
Azure
What Happens When You Tap Sign In
8 steps · 25s
-
Azure
Your Mobile App Is Leaking Its API Key
8 steps · 26s
Get new posts by email
New technical articles, Azure AI and GitHub Copilot updates, and upcoming events. No spam, unsubscribe anytime.