I am new to Databases and related stuff. I am simply not able to wrap my head around the concept of sharding. Can someone please help me understand sharding?
P.S. I am using MongoDB.
Let's say you have an account table in a single database containing user accounts, now after all the optimizations you've done, it's still taking strain.
Now we take users from US and place them in a separate account table on a seperate database and users from ZA into a separate account table on another database and you have some sort of router / loadbalancer reading / writing / updating rows in their relevant databases.
See this article from Percona: percona.com/blog/2015/03/19/choosing-a-good-shard…
Nikhil Mathur
Hard core JavaScript Dev
Jitendra Ojha
Backend engineer
Hi, You should read this article (5 pages) Understanding scalability/distributed systems with example.
Along with sharding you will get to know other techniques and approaches that devs take to optimize and scale applications.