Benchmarking Remote Agent Latency: Cloudflare Tunnel vs. Domestic HTTPS in Ovis

A while back, I set up Ovis on an always-on Mac at home as my day-to-day operational dashboard. Ovis provides a unified browser and mobile interface, while underlying terminal sessions are maintained by Herdr. Once that setup stabilized, checking Agent progress from a laptop or phone was convenient and straightforward.

During routine use, however, whenever a session had extensive history or upon a full-page reload, the browser interface occasionally exhibited noticeable waiting delays.

Faced with such hesitation, the immediate reflex is to suspect frontend DOM overhead, slow layout repaints, or local CPU thermal throttling. But while the dashboard runs inside a local browser tab, traffic does not connect directly to the overseas task execution machine. To see what is actually causing the drag, you have to measure and decompose the entire network path first.


Topology: How Both Ingress Paths Route

In this setup, the workflow ties together three distinct roles: the daily client device (laptop or mobile browser), an always-on home dev machine (hosting the Ovis control plane), and a remote overseas worker (executing long-running Agent tasks).

To measure the overhead introduced across the access layer, I benchmarked two alternative routes using the identical application build, backend configuration, and session data:

flowchart LR
    subgraph CLIENT["Client Devices"]
        BROWSER["Laptop / Mobile Browser"]
    end

    subgraph SCHEME_A["Scheme A: Cloudflare Tunnel"]
        PROXY["Local Outbound Proxy"]
        CF_EDGE["Cloudflare Access / Edge"]
        CF_TUNNEL["Cloudflare Tunnel"]
    end

    subgraph SCHEME_B["Scheme B: Domestic Relay"]
        DOMESTIC_HTTPS["Domestic Server HTTPS Relay Entry"]
        REV_SSH["Reverse SSH Tunnel (127.0.0.1)"]
    end

    subgraph HOME["Home Dev Machine"]
        OVIS["Ovis Control Plane (Always-on Mac)"]
    end

    subgraph REMOTE["Remote Environment"]
        WORKER["Overseas Worker (Long-running Agent)"]
    end

    BROWSER -->|"via Proxy"| PROXY --> CF_EDGE --> CF_TUNNEL --> OVIS
    BROWSER -->|"Direct"| DOMESTIC_HTTPS --> REV_SSH --> OVIS
    OVIS <-->|"Estimated RTT (~270ms)"| WORKER

In both setups, neither scheme requires the home dev machine to hold a public IP address. Scheme A connects through Cloudflare Tunnel; Scheme B relies on an outbound reverse SSH tunnel established by the home dev machine to a domestic server, keeping the original ingress as a backup. The domestic server acts strictly as a reverse proxy, leaving task scheduling and state management on the home dev machine.


Testing Setup: Reflecting Daily Habits

To stay close to daily working conditions, testing was conducted with standard configurations active, browser caching enabled, and pre-authenticated sessions: testing with browser caching enabled and sessions authenticated across alternating runs. The same laptop and browser profile were used, alternating request sequences between the two ingress routes while background processes remained running.

The formal test suite covered 5 dynamic read scenarios, each sampled 20 times per entry (totaling 200 requests), alongside 5 full-page reloads, 10 history-scroll runs per entry, and a 5-minute continuous WebSocket connection health check. Earlier exploratory data collected with caching disabled was excluded.

Key measurement baselines:

  • During standard reloads, primary JavaScript bundles were not re-downloaded, recording HTML Time to First Byte (TTFB), UI shell emergence, and the timestamp when historical messages first became visible.
  • Full history downloads and unchanged conditional reads were tracked separately. The overseas history body averaged ~240 KB; unchanged conditional reads returned 304 with a zero-byte body, avoiding blended comparisons between full payload downloads and cache validations.
  • WebSocket probes strictly used application-level ping/pong alive probes. Responses from the overseas worker were forwarded through the home dev machine, covering the full end-to-end link. Foreground and background samples were tracked separately to prevent background timer throttling from distorting the table.
  • Testing did not input text into the Claude prompt box or terminal, nor did it trigger real Agent requests to generate output. Results reflect session hydration, history loading, and alive probes, rather than keystroke echo or live LLM inference throughput.

Benchmark Data: Looking at the Medians

Compiling the 200 requests and scenario runs produces a distinct comparison. The table below lists measured medians, with the domestic HTTPS relay first and Cloudflare Tunnel second:

Scenario / MetricDomestic HTTPS RelayCloudflare TunnelPractical Impact
Browser ↔ Home Dev Machine App RTT~19 ms~365 msFront-half hop is drastically shorter
Browser ↔ Overseas Worker Full Link RTT (P50 / P95)~288 ms / 502 ms~632 ms / 867 msFull-link median drops by ~344 ms
Reading Home Dev Machine Local Sessions~34 ms~503 msGain stems directly from entry transit
Reading Overseas Worker Session Metadata~292 ms~845 msCross-border metadata fetching accelerates
Reading ~240 KB Overseas History Body~589 ms~2053 msHistory payload download time cut by ~70%
Conditional Cache Read (HTTP 304)~296 ms~660 msValidating unchanged cache responds 2× faster
Routine Refresh (History First Visible)~1.29 s (1.01–2.74 s)~6.92 s (5.06–9.55 s)Most noticeable ergonomic upgrade in daily use
Loaded History Scrolling (Wheel to 2 Frames / Idle Frame P95)~28 ms / 18 ms~27 ms / 18 msNo noticeable difference observed in this round

From empirical comparison: the domestic entry noticeably shortened routine session access and message visibility, yet the second-half cross-border wait remained.

In routine operations, the most tangible difference appears during session switching and full-page refreshes. Under Cloudflare Tunnel, opening a session with extensive overseas history meant watching skeleton screens for 5 to 9 seconds; through the domestic relay, the first line of history typically appeared in just over a second. Because 5 reloads per entry represent a modest sample, ranges are stated directly (1.01–2.74 s vs. 5.06–9.55 s) rather than projecting long-term P95.

Conversely, scrolling benchmarks presented another reality: wheel event duration across consecutive frames hovered at ~28 ms / ~27 ms, and idle frame interval P95 was ~18 ms across both entries. In this round of scrolling loaded history, neither entry showed a noticeable difference, indicating that observed freezes primarily occurred during data reading and hydration rather than when scrolling through already-rendered DOM.


Subtracting the browser-to-home dev machine median from the full-link round-trip clarifies the breakdown across hops.

Estimating by the difference in medians, the hop between the home dev machine and the overseas worker took roughly 267 ms to 270 ms.

This indicates that the domestic HTTPS relay primarily saved the front-half transit between the client browser and the home dev machine (~340 ms), while the second-half cross-border wait remained. This is a link decomposition estimate, not a packet-level measurement, and does not prove that cross-border latency was entirely invariant.

The results also reflect routine split-routing rules: the domestic relay connected directly on the client, whereas the Cloudflare domain resolved through active outbound proxy rules. Furthermore, the client’s Cloudflare edge PoP and the home dev machine’s tunnel edge PoP landed in different regions.

To test proxy overhead, I ran supplementary tests bypassing the local proxy. Bypassing the proxy did not consistently outperform the proxied route, and the edge PoP shifted. Disabling the local proxy is not an optimization verified in this round.

Additionally, across 5 minutes of continuous alive probes, neither entry suffered timeouts or unexpected disconnects, though this does not imply the domestic relay is permanently more stable. The domestic relay captured an isolated full-link spike of ~1.55 seconds; supplementary request tracing also recorded an isolated 3.48-second read where the home dev machine logged an internal processing time of ~109 ms, with the remaining wait not yet pinpointed to a specific hop.


Authentication After Leaving Cloudflare Access

Transitioning to a domestic server requires managing access without Cloudflare Access out of the box. The core architecture remains clean: the reverse tunnel remote backend binds strictly to the loopback interface, paired with Ovis native device pairing for access control.

Across the access tier, the domestic server handles HTTPS termination and reverse proxying, while the home dev machine initiates an outbound reverse SSH tunnel with the remote port bound strictly to 127.0.0.1. Ovis continues to run entirely on the home dev machine. The reverse proxy correctly forwards headers, WebSocket connections, and streaming responses.

For authentication, this setup relies directly on Ovis native device pairing. Unauthenticated protected endpoints and WebSocket handshakes return HTTP 401. Accessing the dashboard from a new origin requires a one-time pairing code; paired devices store independent credentials, and revoking a device invalidates its credentials immediately. Note that if a public reverse proxy is exposed before completing the initial pairing, a brief exposure window exists until that first pairing is finalized.

Automated HTTPS certificate renewal was also verified, keeping the verification challenge port separate from production traffic ports so it runs smoothly in the background.


Takeaways and Reflections

Deploying this dual-entry topology brought session switching and history loading times into a practical, responsive range, making day-to-day Agent monitoring much smoother.

When diagnosing remote Agent latency, consider decomposing the chain in the following order:

  • Distinguish UI rendering from network retrieval: Stable scroll frame rates show local rendering is healthy; latency bottlenecks typically sit in initial session hydration and network round-trips.
  • Deconstruct hop penalties: A domestic relay cuts unnecessary front-half transit to the home dev machine, but cross-border physical latency remains intact.
  • Enforce the perimeter: Bind reverse tunnels strictly to loopback, forward WebSocket connections properly at the proxy tier, and manage device credentials via Ovis native pairing.

Ultimately, network link tuning trims unnecessary ingress detours, but it cannot erase cross-border physical latency or the model’s own generation time. Once unnecessary ingress delays are stripped away, you can judge remote task execution and model reasoning times with far greater clarity.

FAQ

Why does operating a remote Agent in a browser feel sluggish?

Often it is neither slow frontend rendering nor underpowered client hardware, but cumulative network round-trips across access hops. Routing from mobile devices through local proxies, tunnels, and overseas servers adds up waiting time.

Where does the domestic HTTPS relay save time compared to Cloudflare Tunnel?

Estimated by subtracting application-layer medians, the domestic HTTPS relay primarily cuts latency on the front half between the client browser and the home dev machine (dropping the median from ~365 ms to ~19 ms, saving ~340 ms). However, the second-half cross-border wait between the dev machine and the overseas worker remains (~267 ms to 270 ms).

How does the domestic entry improve loading for long session histories?

Under routine refreshes with caching enabled, the time until the first row of historical messages became visible dropped from a median of 6.92 s down to 1.29 s (measured ranges across 5 runs: 1.01–2.74 s vs. 5.06–9.55 s). Fetching the identical ~240 KB overseas history payload dropped from a median of 2053 ms to 589 ms.

Does network ingress affect list scrolling once a session is loaded?

In this round of scrolling loaded history, neither entry showed a noticeable difference (wheel events to subsequent 2 frames averaged ~28 ms vs. ~27 ms; idle frame interval P95 was ~18 ms for both). This indicates that observed freezes primarily occurred during data reading and hydration, rather than when scrolling through already-rendered DOM.

Did the benchmark include command execution or live token generation?

No. The tests did not send text to the Claude prompt box or terminal, nor did they spawn real Agent requests to produce output. Results reflect session reads, history loading, and alive probes, rather than interactive typing echo or model inference throughput.

How was authentication handled after leaving Cloudflare Access?

The domestic server terminates HTTPS and proxies requests to local loopback, with authentication handled by Ovis native device pairing. Verified protected endpoints and WebSocket connections return 401 when unauthenticated; paired devices store individual credentials that expire immediately upon revocation.
w/ Gemini
  1. Replacing Herdr + Ovis with T3 Code: Connecting Three Machines and Cross-Host Access

  2. Auditing the T3 Code Telemetry Controversy: What It Actually Sends and How to Shut It Off

  3. Turning an Idle RTX 4070 SUPER PC into a Wake-on-LAN Compute Node for My M1 Mac

Comments

Spot a flaw, hit the same snag, or just want to say hi — leave a note below.

Loading comments…