Skip to content

Tunnel toggle turns green before tunnel is actually routing traffic #160

@drewr

Description

@drewr

This is part of a four-issue tunnel creation story

A newly created tunnel takes up to ~14 minutes before it reliably routes traffic. There are two distinct delays, each with an operator-side and a client-side component:

  • Delay 1 (~3-4 min): creation → toggle turns green
  • Delay 2 (~0-10 min): toggle green → traffic flows
  • UX consequence
    • app#160 — green toggle shown before tunnel is usable ← this issue

Summary

The tunnel toggle turns green when accepted && programmed == true (ui/src/views/proxies_list.rs:429). This reflects the NSO having written Programmed=True to the HTTPProxy — but at that moment, traffic is not necessarily flowing:

  1. The Envoy data-plane on edge clusters may still be receiving the xDS update (seconds) — see network-services-operator#166 for the ~3-4 min creation delay that precedes this
  2. The iroh-gateway routing path is not confirmed live until the next connector heartbeat — up to ~10 minutes (see network-services-operator#167 and #159)

A user who sees the green toggle and immediately opens their tunnel URL gets connection errors for an indeterminate period.

Observed

For tunnel-xnhnb, 2026-05-22:

  • Toggle turns green: 19:37:37Z
  • Tunnel actually routes traffic: ~19:48:28Z (+10m51s)

Code

// ui/src/views/proxies_list.rs:429
let is_ready = tunnel.accepted && tunnel.programmed;

The polling loop (lines 56-138) stops the 3-second poll cycle once has_pending_status and has_pending_hostname are both false — i.e., as soon as programmed=true. There is no further tracking of whether routing is actually live.

Suggested improvements (in priority order)

  1. Secondary state indicator — After the toggle turns green, show a brief "routing warming up" state (distinct from the initial creation spinner) until a successful HTTP probe through the tunnel URL confirms traffic is flowing.
  2. HTTP probe from the app — Ping the tunnel hostname from the app and only show a fully-ready state on first 2xx response.
  3. routing_confirmed field — Add a field to TunnelSummary (lib/src/tunnels.rs) populated by the connector heartbeat or a direct probe, so the UI has a reliable signal.
  4. At minimum — Tooltip on the green toggle: "The proxy is programmed. Traffic routing will be confirmed shortly."

Files

  • app/ui/src/views/proxies_list.rsis_ready (line 429), polling loop (lines 56-138)
  • app/lib/src/tunnels.rsTunnelSummary struct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions