The problem
On a cold launch, the median time-to-connect on iOS was 2.4 seconds. After our work, it's 1.4. Here's how.
Tunnel Provider warmup
iOS's NEPacketTunnelProvider does a lot of setup the first time it runs each session. We moved that initialization into a background task triggered the moment the user opens the app, so by the time they tap Connect, the heavy lifting is already done.
DNS prefetch
We resolve our authentication endpoint as soon as the app launches — saves ~100ms on the first request after Connect.
The numbers
Median connect time dropped from 2.4s → 1.4s. P95 went from 4.1s → 2.6s. Small wins compound.