Staging and Production (Blue/Green) Deployments on Neon?
Hi, we have a live web application that uses a Postgres database on the neon
main branch. A data pipeline that loads this database with fresh data takes a while to run (20-30 minutes), and the updates involve refreshing data, which essentially causes application downtime.
Is there a way to have a staging branch to update the database, and to propagate the changes to main , which the application sees after the update has completed, so that the database that the app utilizes is never down or refreshed through the pipeline directly, and instead copies over changes from staging?
Cheers.1 Reply
relaxed-coral•2y ago
When you say downtime, can you be more specific? Do you mean Postgres is unresponsive?
During this 20-30 minute process, could data unrelated to the pipeline also get changed by other sources of writes? For example, a user can update some data in tables unrelated to the pipeline?
If no writes occur from other sources, could you have the application connect to a read replica?
https://neon.tech/docs/introduction/read-replicas
https://neon.tech/docs/introduction/read-replicas
Neon
Read replicas - Neon Docs
Neon read replicas are independent read only compute instances designed to perform read operations on the same data as your read write computes. Neon read replicas do not replicate data across databas...