问题原文
原帖链接 · Castro Roy · CC BY-SA 4.0
Let's suppose I have 5 databases I'm going to use in my application. The application will be used by +100k users. I'm planning to use RDS Cluster with Aurora PostgreSQL. What would be best?
Create 1 cluster for each DB, I'll end up with 5 clusters, which I think is good for performance but with a higher cost.
OR
Create a single cluster with enough resources(CPU, RAM, etc.) that will contain the 5 databases in it.
已采纳解答
原帖链接 · MLu · CC BY-SA 4.0
Simple answer: it depends. :)
It depends on how inter-dependent the databases are. If each is used independently by its service or microservice and you have some automation to provision the microservice then it's usually advisable to compartmentalise the whole microservice (compute + database + storage) and have it completely independent from the other microservices. It fits better the DevOps model where the Devs are not only responsible for the code deployment but also for the database and storage.
But in real world and/or with monolithic apps and/or where there is only 1 Dev team it's often the case that the database is shared. It's kind of the old on-prem mindset where a company was paying huge money for a central Oracle RAC that and for an army of DBAs who kept the lights on.
There's no right answer - it's more "modern" to have separate DBs but if the extra cost and complexity doesn't warrant it then by all means use a shared DB. And as Tim says - benchmark the performance.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
