Skip to content

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

Tailscale 8 min read Announcement mediumAdept

We’re making Tailscale faster

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.

Assumes: VPN and NAT basicsLinux networking stackWireGuard

Related posts

  • Netmap caching: keeping Tailscale up on iffy connections

    Tailscale mediumAdept

    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.

  • Enforcing encryption at scale

    Meta Engineering hardMaster

    Meta enforces TLS on internal service traffic with SSLWall, a host-level daemon plus eBPF programs that detect and cut off plaintext connections, chosen over L7 firewalls to keep the blast radius small and allow fine-grained rollout. It combines a tc-bpf filter, kprobes on tcp_connect and tcp_v6_destroy_sock, and BPF maps. It supports a passive monitoring mode, bypasses for BGP/SSH, and plaintext-then-TLS flows like STARTTLS and HTTP CONNECT. Lessons included handling TCP Fast Open ordering via kprobe prehandlers, BPF program size limits, and keeping CPU overhead trivial with early exits and arrays instead of LRU maps. For noncompliant long-tail apps, Transparent TLS uses a cgroup/connect6 BPF hook to redirect connect() calls to a local encrypting proxy, skipping connections that already use TLS.

  • From v0.7 to v0.8: How group commit changed Turso's tail latency

    Turso mediumAdept

    Turso v0.8 adds group commit to its MVCC write path so that concurrent committers share a single fsync of the logical log instead of each paying for their own. In v0.7 a commit lock was held across pwrite and fsync, so with k concurrent committers the last waited for k flushes. Under a 1,000 TPS Poisson load, tail latency ballooned to seconds (p99.9 up to 157 s at 32 connections). In v0.8 committers enqueue log records and get tickets, and the first to take the lock leads, writing all queued records and fsyncing once while the others park until their ticket is durable. That cuts p50 to about 1 ms and p99.9 to 2.4–14 ms, below SQLite's in every configuration, with tail latency improving as connections increase.

  • Chasing that 32 ms tail latency in ClickHouse

    ClickHouse hardMaster

    An extra full round trip (~32 ms) on simple SELECTs over ClickHouse's Native protocol came from TCP_NODELAY turning each end-of-query metadata packet (Logs, Progress, ProfileEvents) into its own TCP segment. After 2 seconds idle, Linux had reset the congestion window to initcwnd (8 MSS), so the server stalled waiting for an ACK before it could send EndOfStream. The team reproduced this deterministically with network namespaces, tc netem and a Go client, and weighed workarounds: disabling tcp_slow_start_after_idle, raising initcwnd, or using TCP_CORK. They fixed it by batching non-time-sensitive metadata packets into a single socket write, which roughly halved server-side segments (50 to 25) and cut tail latency from ~32 ms to ~1 ms.

  • Improving Lakebase Postgres Compute Cache on Neon, Part 1

    Neon hardMaster

    On large fixed-size Lakebase Postgres computes, Neon now disables its NVMe-backed local file cache and sets shared buffers to 75% of DRAM (up from a 1 GB cap), backed by explicit 2 MB HugeTLB pages provisioned through host, hypervisor and guest VM. Huge pages cut per-backend page table overhead by 512× and reduce TLB misses, lowering tail read latency by up to ~40% and CPU by up to ~30% in benchmarks. Production endpoints saw up to 2× throughput, 5× fewer storage GetPage requests and 5× lower CPU, with near-100% cache hit rates. Autoscaling computes with dynamic shared buffers are planned for part 2.

The quest for software engineering knowledge.

Look:
Layout: