July 8, 2021

How do you manage microservice database environments on developer machines?

How do you manage microservice database environments on developer machines?

We are in the process of splitting our monolithic app into microservices. The main reason is that our clients (20-30 different companies) need different features, and it will be much easier to deploy only necessary parts instead of a huge configurable monolith.

Currently we use Docker, which allows developers to quickly get all services up and running. But there's an issue with databases.

Developers often need to restore data dumps from our clients on their local machines for debugging (note that staging servers do not cover this case, due to the need to quickly test experimental changes or migrations, etc). Doing this is relatively easy with a monolithic app, where you just download the dump and restore it in MySQL or PostgreSQL.

But with microservices each of them has its own database, so now you need to download and restore not just one, but 5, 7, or even more! Not only this is tedious, it is also error-prone: you can forget to update one of them and spend hours wondering about data mismatches or more subtle bugs.

How do you manage this? Is there a generally accepted solution for storing and applying a bunch of database dumps for different microservices? Or does everyone just come up with something ad-hoc, either doing everyithing manually or running custom scripts on Docker startup to download and restore DB dumps?

Thanks!

submitted by /u/smthamazing
[link] [comments]