dataiotech Labs
dbaguidedbaguideDBAdataxtoolsdataopsphere
Home/Glossary/Connection
ConnectionArchitecture & Connectivity

Client Connection (İstemci Ağ / Taşıma Soketi)

The physical transport channel established between a client application and the database server via TCP/IP handshake or Unix domain socket (AF_UNIX), with optional TLS negotiation.

Internal Architecture Breakdown

A connection operates at the transport layer, distinct from a database session. Establishing a connection consumes OS file descriptors and TCP socket buffers (tcp_rmem, tcp_wmem) or local Unix IPC buffers.

In process-per-connection architectures like PostgreSQL, each client connection incurs a Postmaster fork() call to spawn a dedicated worker process. Connection poolers keep physical sockets warm to eliminate repeated handshake and process allocation overhead across application requests.

TIP
Architectural Deep Dive: For an end-to-end analysis of the connection lifecycle, transport handshakes, and capacity ceilings, see: PostgreSQL Connection Management: Lifecycle, Capacity, and Pooling.

Production Inspection Queries

PostgreSQL
SELECT count(*) AS total_server_backends FROM pg_stat_activity WHERE backend_type = 'client backend'; -- Not: Bu metrik sunucudaki backend proseslerini sayar; PgBouncer önündeki istemci soketlerini değil.
MySQL
SHOW STATUS LIKE 'Threads_connected'; -- mysqld'ye bağlı istemci soket iş parçacığı sayısı