Database Scaling through Sharding and Partitioning

Question #1.) What is a Database ?

Question #2.) What’s the normal way of database serving the application needs ?

Question #3.) What would happen, if load on DB increases ?

Answer →

Question #4.) Once Load on DB Server increases beyond a certain limit, what do we do ?

Answer → We now perform Sharding. One possible way of doing the sharding is to divide the data based upon region. For e.g.

Question #5.) What is a Shard ?

Question #6.) Explain what is a Shard and what is a Partition ?

Question #7.) Explain the difference between the Sharding and Partitioning ?

Question #8.) How data can be sharded on production ?

Answer → One possible option of sharding the data is based upon the Regions. For example :-

Question #9.) Show some other example for Sharding the data at production ?

Answer → We can also shard the data based upon userName’s first character :-

Question #10.) What are Advantages & DisAdvantages of Sharding ?

Question #11.) Explain concept of Vertical Sharding ?

Question #12.) Vertical Sharding is related to Micro-Services architecture ?

Question #13.) How to communicate to Application-Servers about the exact owner of the particular table ?

Answer → We use Zookeeper for the same.

Question #14.) How to move one tables from one MySql to another ?

Step #1.)

Step #2.)

Step #3.)

Step #4.)

Step #5.) Once the changes are made to the ZooKeeper, they are reactively sent to the API-Servers, which then starts connecting to the DB2 for table T2.

That’s all in this blog. We will see you in next series. If you liked reading this blog, do clap on this blog.



Software Engineer for Big Data distributed systems

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store