I'm currently creating a website for a social project in switzerland.
And before there is an overflow of user, I want to prepare the application to scale.
I answered by myself many questions but some are left.
I explain what I want to do.
First
at the beginnning, the Application will have only one server (short time) with DNS, PHP, Mysql, Data, and memcache.
Second
Then I will split them in two
Third
Here is the problem, I don't know how to do it exactly here to keep the application running well.
I could do :
This would be the scheme, all PHP sessions are kept in the DB.
BUT, how do I sync the data? do I run a Rsync to keep them up to date. do I put them on a separate disk (network disk) to be sure ? but in this case, how can I do in case of user uploads ?
and if the website gets more success and we have to go on greater structures, would'nt it create some latency on updates ?
or would it be a good thing to go directly to amazon's web services ?
some infos I use codeigniter as Framework. I use linux as webserver (distribution not chosen now, but should be Debian)
Thanks in advance for your answers.
According to Wikipedia, Switzerland has 4.6 million German speakers, 1.5 million French speakers, and .5 million speakers of Italian, Romansch and other languages. So I suspect you'll find that a single server will fit your needs. Guess what percentage of the population will visit your site every month or every day to get a sense of how big you can get before running into scaling issues.
So, I don't think you need to worry about scaling yet! Bonus: The time you don't spend worrying about this problem, you can use to solve other problems for your users.
There are a few common paths to scaling web services up, in order of what sites like Flickr and Facebook seem to use:
But, before scaling, measure. Set of tests, calculate your capacity, and don't optimize before you need to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With