Skip to content

How do you deal with migrations practically #1228

Answered by stephenafamo
OscarVanL asked this question in Q&A
Discussion options

You must be logged in to vote

Option 1, causes unexpected behaviours. Probably safe except if the "unexpected behaviour" would cause huge problems

Option 2 requires a bit of downtime. I think this is unavoidable if you're running multiple services on one database and you want to ensure that the version is always correct.

Option 3 doesn't seem practical. But for larger backwards-incompatible changes, perhaps something like that is necessary.

Option 4 sounds the same as Option 2. I think it makes sense the most.

Other questions:

If the rolling deployment happens in quick succession, how do I ensure only one pod perform the migration at a time? Do migrations typically use transactions or locking to avoid this race condi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@OscarVanL
Comment options

Answer selected by OscarVanL
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
2 participants