In 1998 the Internet was handed a remote control with no cord. The protocol was RTSP, and its founding sentence was a small act of architectural heresy: there was no such thing as an RTSP connection. A media server would remember your film, your negotiated transport, your playhead — and it would keep remembering them after the TCP socket that carried your last command had died, been replaced, or been quietly reaped by a NAT box that had lost interest.
The short version
- A successful RTSP SETUP created a server-side control context and handed back a Session identifier. An SDP description and an open TCP connection each did neither.
- The context could survive the death of the connection that created it — but the identifier never replaced the correct URI, the method state, authentication or a working media path.
- Memory was rented, not owned: TEARDOWN, timeout or a terminal server action could turn the very next command into 454 Session Not Found.
The remote control did not need a permanent cord
The first RTSP specification arrived in 1998 carrying a contradiction inside its own job description. Viewers wanted VCR buttons — set up a stream, play it, pause it, seek it, stop it — yet the continuous media almost never travelled down the channel that carried those buttons. The control protocol wore HTTP’s clothes, but a media server had to remember vastly more than one isolated request.
RFC 2326 settled the contradiction with one unusually blunt sentence: there was no notion of an RTSP connection. The server held a session marked by an identifier, and that session was not tied to a transport-level connection such as TCP. A client could open and close a dozen reliable connections while one viewing context kept breathing.
None of which made TCP decorative. Commands needed a path in, responses needed a path out, and interleaved media could even share the control stream. The design made a narrower, sharper claim: the lifetime of the remembered operation was not the lifetime of the socket that happened to deliver one command.
Think of the difference between a remote control and its cord. Yank the cord and the next button press goes nowhere. Yank it and the television does not forget which film you selected, which speakers you configured, or where the playhead sits.
A description is not a session, however often both say “session”
Before a client asked a server to remember anything, it usually fetched a presentation description. RFC 4566 defined SDP as a representation of media types, formats, transport addresses and other session metadata — deliberately nothing more than a format. It did not carry the control protocol and it did not execute anything.
The confusion is baked into the vocabulary, because both worlds use the word session. An SDP document can list audio and video, hand out control references and tell software what might be available. It cannot prove that a server reserved ports, accepted a transport, allocated buffers or created one particular viewer’s state.
RTSP crossed that line with SETUP. The client named a media resource and offered the transport parameters under which it was willing to receive delivery; a willing server picked an acceptable alternative, stored the relevant parameters and returned them. RFC 7826, the 2016 RTSP 2.0 replacement, calls this exactly what it is: the creation of an RTSP session context.
The response carried a server-minted value in the Session header. Description answered, “what presentation and control resources exist?” SETUP answered, “what state has this server accepted for this delivery?” Two different questions. Two different answers. No substitutions.
The second address named remembered state
A media URI identified something worth controlling. The Session identifier distinguished one accepted delivery context from another — which mattered the moment a single client opened two sessions on the same URI, or when audio and video were assembled under common control.
RTSP 1.0 made the identifier an opaque random string of at least eight octets. RTSP 2.0 tightened it to 8–128 characters, demanded cryptographically random generation and recommended roughly 128 bits of entropy. Its nod to RFC 4086 was about guess resistance: identifiers drawn from a weak or predictable process are a gift to anyone who wants to find them.
Better randomness did not turn the string into a security system. RFC 7826 says so in the next breath — the identifier offers no defence against session hijacking unless client, server and trusted proxies keep it confidential. Entropy makes a value hard to guess. It cannot decide whether the presenter is entitled to the film, whether the account is still active, or whether policy currently permits the command.
RTSP borrowed HTTP’s authentication framework for that separate job. Digest, specified in RFC 7616, challenges credentials and carries its own nonce and replay controls. A Session value and an authentication response can share one request precisely because they answer different questions: which stored context, and which requester under what protection space?
A known Session value still needed the right object
Once a client held the identifier, commands about that context carried the Session header. PLAY, PAUSE and TEARDOWN could therefore reach the remembered state even when they arrived on a later TCP connection. The header did not, however, erase the request URI.
An aggregated session makes the boundary visible. Several media streams can share a timeline so one PLAY starts audio and video together; a SETUP citing an existing context can ask to add another resource. Even then RFC 7826 requires an aggregate control URI for aggregate operations. The URI lets a proxy route the command, tells the server which resource is being operated on, and keeps the logs honest.
The identifier may be enough to locate an internal record. It is not permission to apply every method to every URI that record touches. RTSP defined separate errors for a missing session, a method invalid in the current state, and aggregate operations attempted at the wrong scope — a quiet refusal to let one convenient lookup key collapse resource identity, state-machine authority and command validity into a single field.
It also bounded failed growth. If a SETUP tried to add a resource to an existing context and failed, RTSP 2.0 required the earlier session and transport state to remain exactly as if the failed request had never arrived. A half-finished attempt could not silently rewrite an already accepted control surface.
One session could change connections, and one connection could carry many sessions
RTSP 2.0 kept the separation and made the connection rules explicit. Servers had to support both persistent TCP connections and transient ones. A client might send SETUP and PLAY, close the connection, then open another when it later wanted PAUSE. A pair supporting transient connections could survive a TCP loss caused by something as mundane as a NAT timeout.
The inverse arrangement was equally valid: one persistent connection could carry commands for several RTSP sessions. The socket therefore did not identify the viewing context. At any given moment RTSP 2.0 limited an agent to one connection in use for a particular session, so the server knew where to send server-initiated requests — an operational restriction, not a reattachment of session lifetime to that connection.
The media path stayed a third layer. RTP could use UDP ports negotiated in SETUP, or media could be interleaved with control. NAT and firewall traversal still demanded actual reachability evidence. RFC 7825 adapted ICE to RTSP-controlled datagram media for exactly this reason: a perfectly valid control context can sit next to media candidates that cannot reach each other. The Session header says which state to manipulate. It says nothing about whether packets cross the network.
Continued memory had to be earned by signs of life
A server could not hoard abandoned state forever. The Session response could announce how long it would wait between commands or other acceptable signs of life; absent another value, the default was 60 seconds. RTSP 2.0 made the timeout parameter response-only and forbade changing its length mid-session.
Any RTSP request referencing the context could demonstrate liveness. For a pure keep-alive, RTSP 2.0 preferred an empty SET_PARAMETER. RTP deployments could also lean on RTCP: RFC 3550 defined sender and receiver reports as media-source and reception evidence, and RFC 7826 allowed reports tied to the server’s sources and the relevant network tuple to count as proof that the client side was still present.
The evidence was deliberately probabilistic. RTCP reports get lost and arrive on a reporting schedule. A server can make a false timeout vanishingly unlikely without turning a report into proof that a human watched, a frame decoded, a PLAY committed or a subscriber still pays. Liveness justified keeping protocol state. It was never a receipt for the media experience.
The number could remain while the state disappeared
Normal termination used TEARDOWN. At aggregate scope it stopped the grouped delivery and destroyed the context; a permitted media-level TEARDOWN could remove one component, with the last removal ending the session. A server could also time the context out, redirect it toward termination, or end it after an unrecoverable failure.
Past that boundary, repeating the old identifier resurrected nothing. RTSP’s 454 response — Session Not Found — covered a missing, invalid or timed-out Session identifier. The same bytes could be perfectly remembered by the client and still refer to no living server state.
Which is the mechanism’s durable lesson. The identifier did not contain the session. It addressed a revocable record owned by the server. Connection continuity, token possession, URI scope, authentication, media reachability and liveness each contributed evidence, and none of them could impersonate the others.
Every generation of infrastructure relearns this the hard way: a token is not a title deed, a socket is not a session, and a name is only as alive as the thing still willing to answer to it.
Member Briefing
Read the full trend briefing
Members read the full briefing with the source notes behind every finding.
Strategic Circle
A daily briefing in your language, built from changes we have verified.
Join for USD 20/monthCancel anytime.
Members also get the full research library, a daily briefing on the networks they follow and the private forum.






