From 18611be86cc3d11e3fa1f498e9a9e84c76b787ec Mon Sep 17 00:00:00 2001 From: Donne Martin Date: Tue, 28 Feb 2017 05:02:44 -0800 Subject: [PATCH] Add Federation section --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 71fc95b3..eb91a296 100644 --- a/README.md +++ b/README.md @@ -948,3 +948,24 @@ Both masters serve reads and writes and coordinate with each other on writes. I * [Scalability, availability, stability, patterns](http://www.slideshare.net/jboner/scalability-availability-stability-patterns/) * [Multi-master replication](https://en.wikipedia.org/wiki/Multi-master_replication) + +#### Federation + +

+ +
+ Source: Scaling up to your first 10 million users +

+ +Federation (or functional partitioning) splits up databases by function. For example, instead of a single, monolithic database, you could have three databases: **forums**, **users**, and **products**, resulting in less read and write traffic to each database and therefore less replication lag. Smaller databases result in more data that can fit in memory, which in turn results in more cache hits due to improved cache locality. With no single central master serializing writes you can write in parallel, increasing throughput. + +##### Disadvantage(s): federation + +* Federation is not effective if your schema requires huge functions or tables. +* You'll need to update your application logic to determine which database to read and write. +* Joining data from two databases is more complex with a [server link](http://stackoverflow.com/questions/5145637/querying-data-by-joining-two-tables-in-two-database-on-different-servers). +* Federation adds more hardware and additional complexity. + +##### Source(s) and further reading: federation + +* [Scaling up to your first 10 million users](https://www.youtube.com/watch?v=vg5onp8TU6Q)