Would running multiple server processes increase performance or security?

I was wondering about running multiple MariaDB server services on one server to separate apps and have one Unix Domain Socket per db/app.

The thinking is, that as there are some claims out there that multiple PHP backend pools increase throughput on higher load and the same would be applicable to the database and increase performance?

Also the security should be improved as an attacker could only ruin one datadir?

Thank you very much for any clarifications.

Answer Answered by Daniel Black in this comment.

If you are short on hardware resources, cpus memory etc, there will be increased overhead as the OS context switched (small) or paging out of swap (large) between instances resulting in a degraded of performance.

The PHP approach of pooling allows a fixed amount of resources to be available for each application. MariaDB is very good and ensuring a fair use of resources between multiple connections however inadequite tuning/monitoring of connections/table cache elements can cause some contention between different applications. Running separate instances will still require these to be tuned per application.

MariaDB access control with a user per db application (with limited grants) does a very good job of security for many applications. For protection against unknown MariaDB vulnerabilities there are reasonable amount of security benefits of running multiple instances in protecting the security of one application from similar exploitation in a different application (assuming that they are a different applications meaning the same web application exploit that results in a database security issues cannot be applied by the same user to a different instance).

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.