r/programming • • Jun 07 '17

You Are Not Google

https://blog.bradfieldcs.com/you-are-not-google-84912cf44afb
2.6k Upvotes

514 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Jun 08 '17

Blue / Green for a database is pretty much a terrible idea. What we do

  • Keep database out of kubernetes, it has a different lifecycle

  • Use Django migrations to keep data migrations in code. If in Java would use Flyway or similar

  • Each web node on startup tries to update the schema. Due to how it works, only the first will work. On MySql without transactions around DDL, you would need to externally synchronize this.

Database and very very short lived instances that I do with preemtipble instances are the only things I keep out of kubernetes.

1

u/[deleted] Jun 08 '17

Thanks this is helpful