Hermes Wiki

SessionLayer ConnectionLifecycle

OSI Layer 5: managing the lifecycle of a connection — establishment, keep-alive, TLS session resumption, connection pooling — distinct from a single request/response.

Why we need this / what value this brings

Re-establishing a connection (TCP handshake + TLS handshake) on every request is expensive — reusing connections is one of the cheapest latency wins available.

When to use this

Any time the same client talks to the same server repeatedly — DB connections, HTTP keep-alive, external API clients.

How to use or implement this

Use connection pooling for the database, ensure HTTP keep-alive is enabled for outbound API clients, and rely on TLS session resumption where the runtime supports it.

Research questions

  • Why does reusing a DB connection pool (vs opening a new connection per request) matter so much for latency?
  • TLS session resumption: how does it avoid repeating the full handshake on reconnect?

Empty folder — drop notes, links, and findings here as you research.

Hermes Wiki