Site ModernSite Modern

We create professional websites that transform your business and grow your online presence.

Services

  • Presentation Website
  • Online Store
  • SEO Optimization
  • Maintenance

Information

  • About Us
  • Portfolio
  • Blog
  • Contact

Legal

  • Terms & Conditions
  • Privacy Policy
  • Cookie Policy
ANPC SALANPC SOL

© 2026 Bogdan Vasilescu - Site Modern. All rights reserved.

Made with passion in Romania

Reads on replicas, writes on the primary

Abstract blue and green illustration
One primary, two replicas.

The setup

The @prisma/extension-read-replicas extension routes read queries to replicas automatically, while transactions and writes stay on the primary.

  1. Create one client per URL.
  2. Extend the primary client with the replicas.
    1. reads go round-robin
    2. $primary() forces the primary
  3. Verify TLS against your own CA.
Abstract primary and replicas diagram
Streaming replication, in short.

Watch out for

  • Replication lag right after a write
  • pg_hba.conf rules are not replicated
  • The total number of connections
Replicas help with reads, not with writes.

For a read-heavy, write-light blog, the win is immediate.

Published:October 30, 2026