At our job we are having a heated discussion with the DevOps team on how to architect and modularize our microservices. We come from a 2-coupled-monoliths approach, so we are trying to avoid common pitfalls.
Our CI/CD is done with GitHub Actions, and we use Kubernets to deploy our applications.
We started a microservice a few weeks ago, and my development team basically had:
- An API
- A Relational DB
- Some background jobs for recurrent operations or to handle some heavy load
- A Redis DB to store the background jobs
The DevOps team refuses to support these kind of applications, claiming that:
- The migrations of the database should be in a separate repository, because this helps to separate concerns.
- Also, having the migrations on a separate repository helps them to deploy without downtime.
- And last but not least, that our approach is a bad practice from "monolithic frameworks"
- Database changes can be deployed independently from app code by reducing coupling
Our problem as a dev team, is that when you use an ORM the application is tightly coupled to the database, so db migrations and app code arent really independent and decoupled at all. Wheter the migration is close to the application code or separated from it, the developer must always think on how not to break the application when running these migrations. Plus, we are a small dev team (3 now, probably 6 by end of year) so the same person that is touching the app code will have to write migrations, its not that you have a DBA to guard for these kind of problems.
This is one discussion. The other one is, again, that DevOps says that background jobs should be independent and have their own data models. Again, I disagree too much with this point of view, because it just brings up potential duplication of the code just to satisfy someone else.
My concern, as a developer lead, is that we are moving towards a distributed monolith.
Am I just plain wrong? I googled, read blogs, even read a bit about k8s and my conclusion is that the DevOps team is just refusing to cooperate with us, because AFAIK there can be done zero downtime deployments with k8s if the migrations are in the app repository or not.