streaming replication
also: log streaming, continuous replication, real-time replication
A database replication method where changes are continuously sent from a primary server to replica servers in near real-time, rather than in discrete batches. The replica applies these changes as they arrive, keeping it synchronized with the primary.
Streaming replication is a continuous data synchronization technique commonly used in databases like PostgreSQL and MySQL. Instead of waiting for scheduled replication cycles, every write operation on the primary server is immediately transmitted to replica servers, which apply the changes as they arrive.
The primary server streams a continuous flow of transaction logs or binary logs to replicas. Each replica maintains a connection to the primary, receives these updates in real-time, and applies them to its copy of the database. This ensures replicas stay current with minimal lag.
For example, in PostgreSQL, a replica can use streaming replication to receive Write-Ahead Log (WAL) records directly from the primary as they're generated. If a user inserts 10,000 records into a table on the primary, the replica begins receiving and applying these changes immediately rather than waiting hours for a nightly sync.
Streaming replication provides advantages like minimal replication lag and high availability, but requires continuous network connectivity between primary and replicas.