Ask HN: "Simple" sharding tutorials using MySQL or PostgreSQL?
https://news.ycombinator.com/item?id=228581Hiya.
I'd appreciate pointers to tutorials on "simple" sharding using MySQL or PostgreSQL.
What I mean by "simple" is:
- Tables are designed so each one has a field that can be used to identify the correct partition to use (in my case, user_id)
- Data/Queries are organized so that the vast majority of manipulation happens on a single partition
- Rebalancing shards is an offline procedure
I'd love to push the details of disks/servers/processes that handle the queries down into the DB layer and not worry about it at the app (in my case, Rails) layer: give me a single entry point that can shared across all of my app servers. We can play DNS games if need be to distribute that load.
Bonus points if a tutorial talks about how to set up replication in this context too.
It seems like many people would be interested in this.