N
Neon4mo ago
correct-apricot

Hi, I'm trying to understand how we're

Hi, I'm trying to understand how we're supposed to handle HA with Neon. I read the HA docs but it's not the info I need. Normally my app would have a separate read and write client, where the write client is pointed at the master node. In the event of a master failover, we'd connect the write client to a newly promoted master node. Is there anything about how Neon works where this isn't recommended, or necessary?
4 Replies
fascinating-indigo
fascinating-indigo4mo ago
Hi, here's a good overview of how HA is a little different on Neon with separation of compute and storage: https://neon.tech/blog/our-approach-to-high-availability
Neon
Our Approach to High Availability - Neon
In Neon, high availability isn't an add-on but a design choice. Our architecture is resilient to both compute and storage failures.
rival-black
rival-black4mo ago
so if I understand correctly: - if the master fails, it's replaced by a new node in seconds. url stays the same - if I want read-replicas, I can create them from the console, per branch, with their own urls. None of these would ever get promoted to a writer - if I need to loadbalance multiple replicas, I add their individual hostnames to my connection string what I don't get is, if I have two extra replicas, each one has their own connection string, each of which can be pooled.. separately 🤔
fascinating-indigo
fascinating-indigo4mo ago
With Neon's separation of compute and storage, a read replica is a read-only compute instance that reads the same data as your read-write compute. If you need to load balance, you'd distribute your reads among your read replica computes. What's cool about Neon's read replicas, is that you can create them in a few seconds, grab the connection string, and you're ready to go. Instant scaling. https://neon.tech/docs/guides/read-replica-integrations
Neon
Scale your application with Read Replicas - Neon Docs
In Neon, a read replica is an independent read only compute that performs read operations on the same data as your primary read write compute, which means adding a read replica to a Neon project requi...
conscious-sapphire
conscious-sapphire4mo ago

Did you find this page helpful?