whoevermakes asked:
Hi.
Hi.
I’m going to build a high scale site in php/mysql that needs to scale horizontally.
What things should the developer do and not do when writing the code and creating the database?
Thanks.
I’m going to build a high scale site in php/mysql that needs to scale horizontally.
What things should the developer do and not do when writing the code and creating the database?
Thanks.
1 Comment to 'How to design a php/mysql site that will scale massively ?'
April 3, 2009
It depends on how you’re going to scale your database. MySQL allows two approaches. You can either do a replicated setup or use MySQL cluster.
If you end up using MySQL cluster, you don’t need to do anything special in your PHP code; from the outside, the cluster will look and feel like a single server.
If you end up going with replicated setup, you will have to make sure that your application can be configured in a way that allows to run SELECT queries on one DB server and all other queries (UPDATE, INSERT, REPLACE, DELETE, etc.), on another. The server to which you write must be the master server; reading can be done from any of the slaves.
You might also want to check out Cal Henderson’s book, “Building Scalable Web Sites”:
Cal Henderson is one of the founders of Flickr, so he knows a few things about scaling Web applications and shares them generously.
Leave a comment