Michael MacFadden
Michael MacFadden

Reputation: 1117

Best way to host many orient databases

For our architecture we are contemplating something like multi-tenancy. In our approach each tenant would get their own database. When I say database, I don't mean server. I mean a database within an OrientDB server.

The question is... Is there a best practice way to do this. The three options we see are:

  1. Stand up an entire OrientDB server to host a single database.
    This seems inefficient. Especially since we are going to look towards a clustered / replicated architecture.
  2. Put multiple databases into a single OrientDB Server Here I am curious as to scalability. Is there a practical limit to how many databases a single OrientDB cluster can hold? Each tenant may make many connections to the database. If say each tenant makes 20 or so database connections and we have 1,000 tenants, I now have 20,000 connections going to the database. Obviously we would have many servers supporting this load so that would be distributed.

  3. Some middle ground where we have a certain number of tenants hosted in each clustered instance of OrientDB Not sure how to draw the line here.

Just wondering if there are best practices around this? Thanks and keep up the good work.

Upvotes: 3

Views: 613

Answers (1)

Luigi Dell'Aquila
Luigi Dell'Aquila

Reputation: 2814

The physical limits are given by memory size, number of transactions managed per second and number of open files on the OS.

Every db in OrientDB is just a folder on the filesystem, if you never access the db it does not use system resources, but as soon as you access and query it, OrientDB has to keep files open, establish connections to the clients, allocate disk cache and so on.

My suggestion is to have at most a few tens of small databases on the same OrientDB instance.

Upvotes: 0

Related Questions