largest php site

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

What is the largest site that use PHP?
By large site I mean a havy trafic site?
How do you scale up a php site when you have a lot of traffic?

Re: largest php site

Quoted text here. Click to load it

Don't quote me on this, but I believe Yahoo use alot of PHP

Quoted text here. Click to load it

That should get you started.


Re: largest php site

There are a number of ways to scale. There are several factors to consider
on the network level and on the application level, some of which are:

1. The load on the php engine - how much processing is required per visitor,
what are the respective frequencies of different processing tasks, and how
many concurrent users will you have? For most applications, server and
application optimization are sufficient (Zend Caneveral or Zend Optimizer,
efficient application code). However, optimization will only buy you one
order of magnitude, and there are those situations where this is
insufficient. In such cases, hardware solutions must be found. The first
step is to use state-preserving load balancing hardware and several
identical application servers. You will have to separate your data storage
and database server from your application server for this to work, but this
is rarely a challenge.

2. The load on the database - are there many reads? many writes? In many
cases you can cache common read queries - applications that don't have many
writes will scale more easily than applications that store a lot of new
data. You may be able to get away with using a single MySQL database server
and a SAN; the next level would probably be a more versatile enterprise
database solution. Don't give up on MySQL though, it has a lot of potential
and there are scalable solutions emerging these days. Check the MySQL web
site - I believe there was a seminar a couple of months ago about such a
solution. It's not free, but niether is Oracle.

3. Database design. It is imperative that you design your database well.
This is not difficult, but happens so rarely that I must mention it. The
statistics are shocking. If you are developing a scalable application that
uses a database, I implore you to read (or review) one or two good books on
relational databases. A good start is "Relational Database Design Clearly
Explained, Second Edition" by Jan L. Harrington, with whom I am not in any
way affiliated.

4. Storage - how much data do you plan to store/collect/use per visitor? If
each visitor has just 10MB of storage, and there are 100,000 active users,
you will need a terrabyte of storage - which may be possible on a single
machine. But how often are the files accessed? If each user accessed just
500kB per day, you would need 1.5 terrabytes of bandwidth per month. To give
you some perspective, a T1 line (at $500-700 per month) would yield some
500GB of total bandwidth. The result - you may need a bandwidth solution
before a you need a storage solution.

5. Type of access. It may be that many scripts or files (or more challenging
still, the same script or file) are accessed simultaneously at a particular
time and rarely at others - this interesting scenario can be seen in online
ticket sales for events such as concerts or games. Several solutions exist,
and vary significantly in effectiveness and reliablity. You will need to
account for peaks in bandwidth and ensure that there is sufficient slack in
the bandwidth available to you to handle the overload. Application
processing during such peaks may also pose problems.

As you can infer, the cost and solution can vary substantially depending on
your application, and it is only through rigorous analysis of a specific
situation that an ideal solution can be found. Often exact usage metrics are
not known prior to deployment and in such cases historical analysis of
similar functionality must be used to quantify predictions. Moreover, in
these situations measures must be taken to verify the conformity of
estimates to actual usage and alternative infrastructures must be designed
for rapid deployment in the event of unpredictable variations from the
projected load.

Do you have a site that needs scaling? We would be happy to consult with you
to determine if this is indeed the case and if so what the best course of
action is. Scalable systems are not inexpensive, but the cost per visitor
tends to be a lot lower with larger systems - I challenge you to find anyone
who thinks that $25k per month is a major cost when there are a million
people who frequent their web site.


Re: largest php site

On Thu, 26 May 2005 00:34:50 +0000, mickeyg wrote:

Quoted text here. Click to load it

Who knows?

Quoted text here. Click to load it

Renault's uk site seems to cope ok running php

Quoted text here. Click to load it

Find out where the bottlenecks are and then address them.

Anything that doesn't have to be dynamic, convert to static html.

Avoid doing on the fly graphics generation if possible.

Ensure programming libraries are cleanly coded and only load the code that
is really needed to produce a page.

Put graphic/flash etc files on different servers.

Buy a faster server with dual processors more memory, faster disks.

Split the application and database onto different servers.

Ensure database design is efficient, follow third form normalisation

Learn to use stored procedures and views instead of simple SQL statements.

Ensure tables are correctly indexed.

Ensure quiries only return nessecary rows.

Minimise the number of SQL queries used per page.

Use a website testing tool to analyse how your site reacts to varying
levels of requests.

Avoid using network functions such as DNS lookups, RSS readers, FTP etc.
If you do need to access remote sites have a management program that
operates seperately from the main site and cache the results.

Re: largest php site

The difficult question is "how do I get a lot of traffic?" I once
worked on a site for a government agency. They were anticipating
"millions" of visitors. On a good day we get maybe ten.

Site Timeline