educative.io

Can someone explain this paragraph in a more clear way?

I was confused to see this statement when designing Instagram:
“”"
We can have a large number of logical partitions to accommodate future data growth, such that in the beginning, multiple logical partitions reside on a single physical database server. Since each database server can have multiple database instances running on it, we can have separate databases for each logical partition on any server. So whenever we feel that a particular database server has a lot of data, we can migrate some logical partitions from it to another server. We can maintain a config file (or a separate database) that can map our logical partitions to database servers; this will enable us to move partitions around easily. Whenever we want to move a partition, we only have to update the config file to announce the change.
“”"

What exactly this statement want to say? Anyone can give a more clear explanation?

Thanks and much appreciated!


Type your question above this line.

Course: https://www.educative.io/collection/5668639101419520/5649050225344512
Lesson: https://www.educative.io/collection/page/5668639101419520/5649050225344512/5673385510043648

Dear @Michael_Educative,
The paragraph explains the whole back process of how the information and Instagram are linked. The database is referred to the data of the users using the application; if there are a lot of user/data present in one particular server, then we can migrate it to other database servers. The migration can be done by making a config file, which will check the activities and eventually help move the partitions quickly.

Hope it clarifies!

Breaking it down line by line:

We can have a large number of logical partitions to accommodate future data growth.
=> we resolve to data partitioning to speed up our queries. Think of a single table with 1 M rows and compare the performance of search with tables of 100K rows. 1M table can be split to 10 (100K) table.

such that in the beginning, multiple logical partitions reside on a single physical database server.
=> DB instance/s run on some physical server. logical partitions means we partition’ed the data ( horizontal or vertical ) and stored all of them in a single server. Its like a mapping. Partition1 => Server 1, Partition 2 => server 1 etc. Later on we can split to Partition 1 => server 1, partition 2 => server2

Since each database server can have multiple database instances running on it, we can have separate databases for each logical partition on any server.

So whenever we feel that a particular database server has a lot of data, we can migrate some logical partitions from it to another server.
==> the above two statements have been explained above. Here it means if with time and too many writes. size of any of your partition exceeds, then in such cases we can have them move to different physical server. like
Partition 2-> server 2

We can maintain a config file (or a separate database) that can map our logical partitions to database servers; this will enable us to move partitions around easily. Whenever we want to move a partition, we only have to update the config file to announce the change.

==> This is just a way to maintain the mapping we have defined earlier between partition and server. its mentioned that we can do that via config file.

Let me know if something is not clear or is ambiguous

Look at the “Consistent hashing” section, especially the V-node part.