开发者

PHP / MySQL on multiple servers. Good entry point

my first question here :)

Does somebody know a good entry point (good links/books) for webapplications shared on multiple 开发者_开发知识库servers? i want to know how to deal with data when i hava for example my site on installed on two servers + a mysql database on a third server.

I found several books regarding this topic but they are either to complex (wikipedia/facebook-like architecture) or are not dealing with PHP/MySQL. I'm not exactly a PHP beginner and i am just interested in practical approaches to avoid inconsistencies etc.


The thing is, there are multiple ways of doing it and you'll usually end up doing all of them.

One is to replicate your data on multiple servers. There are varieties of means to proceed (master-master using NDB, master-slave using InnoDB).

The other is to partition your data, in other words splitting a huge table in bite-sized chunks.

A subset of partioning is when your data can additionally be split into wholly independent chunks. In this case it might even make sense to break a few foreign key references and store them into entirely separate databases. For an example of this, see WordPress/HyperDB.


learn about storing sessions in external places (i.e. memcache), distributed file systems, load balancing and reversing proxy (ie HAProxy), using database clusters, cache clusters (again memcache)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜