Cold versus warm connections in a proxy speed test

Build separate cold and warm proxy speed tests and identify which most closely reflects your application's real connection behavior.

A laptop, router and compact computer are connected by cables on an outdoor table.

First visits and repeat visits feel different

A first request may need a DNS lookup, a new connection and a TLS handshake. A subsequent request can sometimes reuse work already completed. A browser visiting several pages in a session sees a mix of these states. Comparing a fresh request on one service with a reused connection on another can create a convincing but misleading performance difference.

Prepare two separate runs

For the cold case, start with the agreed clean client state and verify how the test tool handles DNS and connection reuse. For the warm case, reuse the normal application session over a short sequence of permitted requests. Leave the origin content and user-visible assertion unchanged. Document browser or client version and distinguish a reused network connection from a response served entirely from cache.

A browser that immediately opens a second tab may share some connection state with the first. Closing only that tab is therefore an unreliable way to recreate a completely fresh client for the comparison. MDN guide to resource timing.

Pick the result that matches the customer

A developer making one request per scheduled process may care mainly about setup time. An interactive catalogue explorer may care much more about subsequent page loads. Keep both in the XtremeProxy evaluation but give each its own label, sample size and success count. A clear separation can explain why two teams using the same supplier report different experiences without either measurement being wrong.

A first visit pays setup that a repeat request skips

A release test opens a fresh client for a single request and records 480 milliseconds. A second request reuses the established connection and completes in 140 milliseconds. Those two observations are compatible with a startup cost, but they do not establish its exact cause. Repeat the experiment with the same fixed response, record connection reuse and cache behavior, and group cold and warm journeys separately. A scheduled worker that exits after each run will experience a different mix from a long-lived service.

Separate cache warming from connection warming

A repeated URL may be served faster because its representation is cached, because the connection is reused, or both. In a controlled environment choose fixtures that distinguish these effects. Record the representation revision and the client's connection evidence. Avoid changing headers or cache policy in a way real users never experience.

Define which layers the word “cold” includes. A new browser profile, a new TCP connection, and an empty edge cache describe different experiments. Keep the edge object warm while comparing new and reused connections if connection setup is the question. Record the cache state actually observed.

Choose a traffic mix that matches the application

If a job opens a new client for each hourly run, all first requests count as cold under that definition. A long-lived worker issuing one initial and nine reused requests has a very different mix. Publish the two latency distributions with the expected mix rather than comparing the hourly job's cold result against the long-lived worker's fastest warm request.

Connection warm-up can happen before the measurement starts if a browser preconnects to the service. In a controlled comparison, record when the browser established the connection and when the measured navigation actually began. A navigation that appears to have negligible setup time may simply have inherited setup paid for earlier. Decide whether your business question is the experience of an ordinary visitor, including that optimization, or the cost of opening a fresh connection from a scheduled worker.

Write the experiment's reset instructions in terms another engineer can repeat. A newly opened browser profile changes application state, while a newly created HTTP client changes connection pooling. Neither statement alone describes a shared delivery cache. Declare which layers were deliberately held warm and which were recreated. Keep the returned payload revision stable across runs. The resulting cold and warm labels have operational meaning and can be compared against how frequently the real application creates clients or repeats a request.

A good benchmark report states which conditions were reset and how many requests reused established state. That lets the application owner select observations representing its own operating pattern. Regional download release checks offers a controlled regional download. Understanding time to first byte on a proxy connection clarifies a particular boundary that can shift substantially when a new connection must be established. Technical references include RFC 8446, TLS 1.3. Compare XtremeProxy network types.

Frequently asked questions

Does closing the browser guarantee a completely cold network test?

Different layers retain DNS answers, session tickets and cached objects. State which layers the test actually reset and label the starting condition precisely. A fresh application process is one useful condition with defined limits.

Related articles