liveBook · Manning

Read replication

As explained in Kubernetes for Developers

A read replica is a synchronized database instance that serves read operations separately from a primary writable instance.

A read replica is a synchronized database instance that serves read operations separately from a primary writable instance. Route SELECT queries to replicas so the primary can focus on writes and remaining database work. section 6.4.1

Prepare for this pattern before scaling by using two application database connections to the same database. Give the second connection a read-only user, then change its instance address when an actual replica is deployed. section 6.4.1

Preparing an application connection

Configure the primary connection for normal read/write access and a separate read-only connection for SELECT queries. Initially both may point to one database; later, point the second connection at the read replica. section 6.4.1

How Kubernetes for Developers covers it

How deep it goes
Provides an implementation pattern with separate connections and permissions, but does not detail replication internals.
Examples
Uses two connections to one database first, then redirects the read-only connection to a deployed replica.
What it assumes
Assumes database connection configuration and teaches the read-only connection pattern directly.
What you can do after
Configure an application for read scaling by separating read-only and primary database connections.
How it connects
Connects primary databases, SELECT queries, read-only database users, and horizontal scaling.

Also explained in

Compare how 2 books explain read replication →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes for Developers. The section links point to the parts of the book it draws on.