主/从Mysql体系结构与服务器/读取数据库和单独的数据库仅用于写入 [英] Master/Slave Mysql Architecture vs Server/Read DB and Separate DB for writes only
问题描述
主/从类型mysql体系结构与负载平衡Web服务器(每个数据库都具有只读数据库)和使用单独的mysql数据库(仅用于写操作)的负载平衡Web服务器有什么优缺点?
What are the advantages and disadvantages for Master/Slave type mysql architectures vs load balancing web servers with read only db's in each using a separate server holding a mysql database just for the writes?
推荐答案
当您的应用程序读取繁重"时,主/从类型体系结构非常有用,即与数据库的大多数连接都用于读取数据,而不是写入数据.
Master/Slave type architecture is useful for when your application is "read heavy", that is a majority of connections to the database are for reading data as opposed to writing data.
Master/Slave允许您通过添加更多硬件来扩展应用程序.只需在新框上创建数据库的副本,然后将其作为从属服务器添加到主服务器即可.
Master/Slave allows you to scale out your application just by adding more hardware. Simply create a copy of the database on a new box and add it as a slave to the master.
关于
通过读取来平衡Web服务器的负载 每个数据库中只有一个使用单独的数据库 服务器只持有一个mysql数据库 来写?
load balancing web servers with read only db's in each using a separate server holding a mysql database just for the writes?
这听起来像是主/从类型的体系结构.使用主/从服务器,您希望从服务器是只读的,因为主服务器是唯一数据更改(这些更改会传播到从服务器)的地方.
This just sounds like a Master/Slave type architecture. With Master/Slave you want the slaves to be read only, as the master is the only place where data changes (and those changes propagate to the slaves).
这篇关于主/从Mysql体系结构与服务器/读取数据库和单独的数据库仅用于写入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!