top | item 32996076

(no title)

thickice | 3 years ago

a database noob question, when you say distribute the database to 50 servers all these are shards, correct? MySQL (or any standard RDBMS) can't span more than one server, correct ?

discuss

order

unoti|3 years ago

> when you say distribute the database to 50 servers all these are shards, correct?

Yes, these are separate server instances that are essentially separate from each other. All of the records for a given user live on a single particular server. Although MySQL doesn't do this kind of partitioning inherently, this kind of partitioning can be implemented in the application.

tehbeard|3 years ago

Is there a write up somewhere on how you handled cross database transactions? E.g. Bob on db#12 gifts Alice on db#23 a "MegaPlushie(tm)"item?

Interested to know how you'd avoid duplicates and lost transactions while maintaining a comfortable level of performance/latency for an online game.

MuffinFlavored|3 years ago

would be cool if there was a free open source program that did this well written once so we could all benefit from it

dsr_|3 years ago

Sharding is when you store your tables, or parts of tables, on other machines, so that queries are executed by the resources of those remote machines.

Read-only replication stores a copy of the whole database on other machines, so that any query which doesn't write can be handled by asking the remote machine. Writes are bottlenecked through the primary machine, which then sends changes to the remotes.