Answer the question
In order to leave comments, you need to log in
What are the disadvantages when building SaaS services in the approach “for each account - a separate copy of the database schema”?
If we consider such systems as, for example, cloud CRM - why not create a separate database for each account (mysql is of interest)? The advantages are obvious at first glance: -
an additional level of data protection (there is no chance that, in case of an error in the software part, the user will see "foreign" data)
- it is easier to scale by sharding - further spread the database of different accounts across servers
- the software part is simplified - it is not necessary in every request add project_id
- easier to manage indexes - when placing indexes on disk, the effect will be the same as when creating partitions indexes for each account (if not right, please explain)
It is clear that you will need a separate scheme for general data - accounts, billing, etc. .d.
What are the disadvantages of such an approach?
Answer the question
In order to leave comments, you need to log in
-additional level of data protection (there is no chance that in case of an error in the software part, the user will see "foreign" data)No
- it's easier to scale with sharding - further spread the database of different accounts across serversmost users will never need this
- the program part is simplified - it is not necessary to add the project_id to each requestit all depends on the architecture - in the general case there is no such problem
- easier management of indexes - when placing indexes on disk, the effect will immediately be the same as when creating partitions indexes for each accountwhich will lead to additional frames - which is not very profitable for the service
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question