Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Tailscale 11 min read Deep dive mediumAdept

Netmap caching: keeping Tailscale up on iffy connections

Tailscale clients can now cache the network map (netmap) to disk, so nodes start faster and can reach peers even when the coordination server is unreachable after a restart. The cache stores per-node chunks (endpoints, home DERP region, self settings), writes only changed chunks to limit latency and disk wear, and expires stale entries when a full netmap arrives. Because DISCO keys are regenerated on every start, new DISCO public keys are sent inside the DERP-relayed WireGuard tunnel to restore direct connections, and clients remember multiple DISCO keys per peer to resolve conflicts. Connectivity still degrades over time without the coordination server. The feature is opt-in via the tailnet policy file and not yet available on iOS or Android.

Assumes: NAT traversal basicsWireGuard basicspublic-key cryptography

Related posts

  • We’re making Tailscale faster

    Tailscale mediumAdept

    Tailscale is speeding up its Linux and Android data plane by parsing small packets in place inside the large GRO read buffer instead of copying each into its own 64 KiB buffer, which gave roughly a 5% speed-up. It is also shortening packet queues and using writev to hand scattered packet pieces to the kernel without copying. The freed memory funds a multi-queue pipeline for subnet routers, app connectors and exit nodes, where each flow is pinned to one of several parallel lanes sized to CPU resources, preserving per-stream ordering while using more cores. Netmap caching lets clients start from an on-disk network map when the control plane is slow or unreachable, starting one to two orders of magnitude faster on warm starts, with caveats for huge tailnets and wear-sensitive storage.

  • MagicRoute: Routing without physical routers

    Tailscale easyNovice

    MagicRoute replaces Tailscale's DERP-region-based regional routing with per-client scoring of subnet routers, app connectors and Service hosts, currently using coarse geographic distance rather than latency. Regional routing caused connectors on well-connected backbones to flap between DERP regions with near-identical latency, which broke SSH sessions and triggered cascading client switches. MagicRoute keeps clients on their preferred connector while it stays healthy, spreads ties evenly, fails over down a ranked list, and works with custom DERP servers. It is in beta for Premium and Enterprise tailnets as a single tailnet-wide setting, with reachability checks and more scoring signals under consideration.

  • Introducing Web Cache API support on Deno Deploy

    Deno mediumAdept

    Deno Deploy now offers beta support for the web-standard Cache API, giving serverless code semi-persistent storage for Request/Response pairs via caches.open(), cache.match() and cache.put(). Entries persist indefinitely (usually at least 30 days) unless expiry is set with standard Expires or Cache-Control headers. The backend is a multi-tier LSM storage engine that moves 512KB pages between RAM, local NVMe SSD and object storage, using io_uring to reach 2.4Gbps and sub-millisecond random I/O. It is free during the beta, and measured costs run about 10x lower than Deno KV.

  • Codex Cloud shipped with Tailscale support. Nobody told us.

    Tailscale mediumAdept

    OpenAI's Codex Cloud launched with Tailscale as its only VPN provider, built on public Tailscale features without any partnership. Setup uses a reusable, ephemeral, tagged auth key (e.g. tag:codex) so each cloud task VM joins the tailnet with scoped access. Connectivity is limited to HTTP/HTTPS, plus arbitrary TCP via HTTP CONNECT on proxy:8088, and IPv4 subnet routes. MagicDNS, split DNS, UDP, ICMP, SSH and inbound connections are unsupported. To fence in agents, tag agents and resources, restrict access with grants, keep key expiry, enable network flow logs and turn on device approval.

  • How Tailscale can make secure MCP access with DCR easier

    Tailscale easyNovice

    MCP's authorization spec strongly recommends OAuth Dynamic Client Registration (DCR), a decade-old spec that major IdPs like Google, GitHub and Entra ID still don't support, which is why MCP servers often force users to create OAuth clients manually. Tailscale proposes running a local DCR-capable authorization server behind tailnet ACL grants, so only specific identity-provider groups can reach it and register clients. For simple internal deployments, MCP servers can skip OAuth entirely and check the caller's Tailscale identity directly. Gateway and intermediary-agent setups likely need STS token exchange, which Tailscale is adding to its experimental tsidp server.

The quest for software engineering knowledge.

Look:
Layout: