4 ms·
Here's what you really need to know: YAGNI, YAGNI, YAGNI. It is overwhelmingly likely that by the time you actually need to know about sharding, you won't be "
by mechanical_fish 18y ago
Here's what you really need to know: YAGNI, YAGNI, YAGNI.
It is overwhelmingly likely that by the time you actually need to know about sharding, you won't be "new to this" anymore. :) It's a technique for sites with so much write traffic that a relational database running on one big machine with a lot of disks isn't enough to keep up. That is a lot of traffic, particularly if you're good at regular old SQL performance tuning, which is what you should learn first.
Anyway, I haven't studied sharding too closely myself because... IAGNI IAGNI IAGNI. But here's what I remember from spying on smarter people in hallways at conferences: Pro: You get to spread your database writes over multiple machines. Con: making an RDBMS do an efficient JOIN across machines, or enforce constraints across machines, or (god help us) execute an efficient atomic transaction across machines ranges from "annoying" to "incredibly effing difficult", which erodes much of the advantage of your RDBMS in the first place and causes people to start muttering about alternatives.