So I am developing my own DBMS as a resume project, but I am so deep now on this that I am even considering in the future to release it as an open source project and receive feedback from the community. My DBMS has to be customizable, and with that I mean that you can literally write your own code to change features of it in an easy scalable way.

While developing this project I was wondering one important thing: let's say we have multiple different databases running in the same machine and each database stores different types of data that can be retrieved in different ways. So in my project I have defined an interface called DatabaseEngine which handles all the DBMS operations on collections and there are many different DatabaseEngines which store and retrieve data in different ways.

Let's suppose that we have 3 databases running in the same machine. Should I allow that these databases can use different DatabaseEngines? Is it possible in a production environment to have multiple different databases running in the same machine?

At the moment I am saving the specific DatabaseEngine to be used for each different database in a file called "dbconfig.conf". There is 1 dbconfig.conf file for each database. When the database is loaded it reads the config file and uses the chosen DatabaseEngine. However, initially, I used to store the DatabaseEngine in the config collection of the database representing my DBMS (for example in MySQL the database representing MySQL is mysql if I am not wrong).

However if I do this when each database is loaded the database reads which DatabaseEngine to use from the config collection of the main db and the DatabaseEngine. It's the same for every different database.

  • 4
    Welcome to SE.SE, Andrea. Consider splitting your question into paragraphs. A wall of text with no moment to breath would discourage potential answerers to read your question in the first place, and would eventually attract downvotes. Also consider using a spell checker (Chrome has one inside, possibly other popular browsers do as well), and use capitals where expected. May 19, 2021 at 20:05
  • 1
    @ArseniMourzenko Yeah I am sorry, I am new to this, thanks for the feedback!
    – DRE
    May 20, 2021 at 12:53
  • 1
    Yes it is fine to have multiple database engines running on the same machine in production. Obviously the machine should have the capacity to handle it, but this depends more on the total amount and cost of queries and transactions than on the number of database engines.
    – JacquesB
    May 20, 2021 at 17:54

2 Answers 2


Is a good practice to have multiple databases running in the same machine in production?

It's not a bad practice, if it makes sense for a user's applications.

Also, not everything runs in production. Even if someone said it was not a good practice to have multiple databases running on the same machine in production, what about on your local workstation? There are many other environments besides Production.

  • 1
    One question, should i allow different databases to use different DatabaseEngines?
    – DRE
    May 20, 2021 at 15:44
  • 2
    That sounds like it could be a useful feature. May 20, 2021 at 15:47

In theory nothing prevents you from deploying multiple databases on a single machine. But in practice it adds some workload to configuration and maintenance. Plus, a bug or a heavy query causing a huge CPU usage may indirectly affect all the services.

You cannot use standard ports for connections and directory names for storage and logs. Debugging a process taking too much CPU and tracing back to the starting point would be more difficult.

Moreover if you deploy a web server alongside the databases on the same machine and you have a lot of clients you may run out of temporary ports. Even management of the static ports might get complicated, you have many, but the ones easy to remember and different enough to avoid confusion and misconfiguration are not so many.

Many of those headaches could be simply avoided by wrapping the single instances in virtual machines, but you may have some overhead and you'll some extra configuration work anyway.

  • 1
    Yeah I was thinking exactly about the use of VMs, but i feel like it sounds a bit forcing.
    – DRE
    May 20, 2021 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.