5 ms·
You shoot yourself in the foot pretty hard regarding point 2 (scalability) if you have your microservices share a DB.
by ramblerman 4y ago
You shoot yourself in the foot pretty hard regarding point 2 (scalability) if you have your microservices share a DB.
- jollyllama 4y agoOr hardware. I worked on an HPC product which used "microservices" of a kind but many of them were tied to specific hardware nodes. So much of what we think of as "microservices" relies on a fairly narrow set of assumptions, and mostly makes sense in specific contexts, i.e. cloud, APIs, etc.
- barrkel 4y agoFWIW, most of Google's Ads services share a database - the catch is it's F1 on top of Spanner. Latency is highish, but throughput is good. In the outside world, for an application that may truly need to scale, I'd go MySQL -> Vitess before I'd choose separate data stores for each service with state. But I'd also question if the need to scale that much really exists; you can go a long way even with data heavy applications with a combination of sharding and multitenancy.
- henryfjordan 4y agoMicroservices, by definition, do not share a DB. If they do then you just have multiple processes in the same larger service.