Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
But any reasons as to why sharding is bad for you?
If you do it without rigorous planning, it will end up bad.
If you have "users" and "favorite_books" in two shards, getting complex aggregates based on joins over those tables might perform very badly.
If your application has a "central" table (like users) with a lot of 1-to-many relationships (unique per user, like addresses or pets), and you rarely need statistics over the complete set, you can horizontally shard your users -- 100k users with their addresses and pets in one DB, 100k in the next, etc. Con is in many-to-many performance -- finding users who share favorite books with a certain other user is annoying to query when data is spread over 10 dbs.
Another option is vertical (domain) shards: Multiple products can be split into multiple databases. Con is performance on joins on the edges where your products share data.
My approach is to not shard, just have a single read-write master, and use readonly replicated servers as much as possible.
@bittersweet Nice explanation, thanks a lot. 😄
But to be precise, the subject is no longer “don't ever shard your database” so much as “don't ever shard your database without knowing what you're doing and after really careful planning”. One could say that's an understatement, but we all need to be reminded of that last part once in a while.
Some tutorials be like:
Hey! there's this great thing called X.
Here's how to do X:
3. Done! Hurray!
1. a fails
Try steps 1.1, 1.2, 1.3,... To alleviate
... get to step 6... Realized that steps 2 and 4 have to be re-done. Go back and do 2,3,4, realize now are 5 fails. Try to do 5.1,5.2,5.3,...
Facepalms and dies. Bury me with my computing peripherals.
Best not to shart it either 😂
Root801673y@hell When I was managing a series of small MMOs, I would regularly make a player account and interact with players in a non-admin setting to get a feel for the community, what players liked the most, what they disliked, try to learn of exploits, etc. The games in question were fairly small (400-6k players each), so with some effort I could get to know the playerbase pretty well.
While managing one of them (I'd switch every few months to years), one of my admittedly less serious (okay, the least serious, ever) of these toons was Bubba, a very large and very gay black man.
Several of the players knew it was me and took it very well. Because of this, and because I was active in the pvp aspect of the game, there was even a running joke among the playerbase about not getting raped by Bubba (meaning pk'd/banned, depending). The entire thing was very jovial, and honestly Bubba was probably the most enjoyable part of that particular position.
I had completely forgotten about that until you brought it up.