Do the terms "connection" and "session" mean the same thing? for example is a "TCP connection" the same thing as a "TCP session"?

  • If you consider regular web traffic then no. A session (e.g. via session cookie) can last multiple hours or days and it can apply to multiple connections.
    – Robert
    Dec 19, 2021 at 21:56
  • For a good explanation of TCP layers, see guru99.com/tcp-ip-model.html . Dec 19, 2021 at 22:01

1 Answer 1



Depending on the protocol they may be identical (as is the case with protocols like SSH and Telnet), but in many common cases this is not the case.

For other protocols there is a more tenuous relationship - FTP for example has 2 connections per session.

For web connections the connection is even more tenuous and depends on a many factors. In the naive case, 1 session will have many tcp connections, and is defined by tracking a cookie between connections (http/s is largely stateless, so needs to be built up in layers using cookies and javascript). (It gets hairier - you get persistent connections, caching, and UDP streams in HTTPS now)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.