Ask HN: Database migration on production without downtime

news.ycombinator.com
1 min read
difficult
How do you handle database migration on production servers without downtime?We are currently struggling to find the right strategy to handle migrations of our database schemas without downtime. We are running a NodeJS application with a MongoDB on Kubernetes and can have thus pods of different versions running concurrently when deploying a new version (we currently perform rolling updates).Some options we have been considering:1. Using an evolutionary database design (only adding fields to the schema) and having the newer version write both the old and new. 2. Extracting the DB repository to an external versionable service that reads/write from the DB and returns a different schema version depending on what application version requests an entity.Further suggestions are greatly appreciated! Comments URL: https://news.ycombinator.com/item?id=22698154 Points: 1 # Comments: 0
We are currently struggling to find the right strategy to handle migrations of our database schemas without downtime. We are running a NodeJS application with a MongoDB on Kubernetes and can have thus pods of different versions running…
Read full article