Back

MariaDB Scaling - Databases vs Collections vs Documents

  • 1
  • Databases
jSnake🐍🕊
4 May, 2023, 20:46

I'm curious about the performance and scaling implications of having many databases as opposed to having many collections with fewer databases or finally the fewest database and collections with documents isolated by an id attribute.

Which complicates horizontal scaling more? Having thousands of databases or thousands of collections inside a single database or finally the fewest databases and collections with a very large number of documents isolated by an id attribute?

The isolated groups of data will have very few dependencies between each other in my project and I want to make heavy use of the real time API.

TL;DR
The user is asking about how Appwrite differentiates between collections in different databases. They are also curious about how the Appwrite database is isolated in MariaDB. The team suggests building the database around real-time functionality. Each collection in Appwrite translates to a table in MariaDB. The user is asking about the performance and scaling implications of having many databases versus many collections within a single database, or having fewer databases and collections with documents isolated by an ID attribute. They mention that the isolated groups of data in their project have very few dependencies and they want to make heavy use of the real-time API. No solution is provided in the thread.
Bouahaza
5 May, 2023, 15:17

A database on appwrite isn't a database on mariaDB

jSnake🐍🕊
6 May, 2023, 03:13

hmm interesting, how does that translate to mariaDB?

Drake
6 May, 2023, 03:29

Only one mariadb database and each collection is a table

Bouahaza
6 May, 2023, 15:11

If you want to use realtime, build your database around it

Bouahaza
6 May, 2023, 15:12

The appwrite realtime is one of the most efficient I've tested, especially because there is only one websocket channel. The team did a great job 🙂

jSnake🐍🕊
7 May, 2023, 00:11

Awesome, could you explain a bit more what you mean by building the database around it?

Nevus
7 May, 2023, 02:03

How is appwrite database isolated in mariadb side?

Drake
7 May, 2023, 04:15

What more are you asking about?

Nevus
7 May, 2023, 04:49

If its a single database in MariaDB side how does appwrite differentiate between collections in different appwrite databases?

Drake
7 May, 2023, 04:51

We prefix the table name with an internal project id and database id. Feel free to spin up a local instance of Appwrite and connect to the mariadb database to see

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more