PHP Load Question

Discussion in 'Web Design and Development' started by X1Lightning, Oct 27, 2007.

  1. X1Lightning macrumors 6502

    X1Lightning

    Joined:
    Feb 19, 2007
    #1
    I'm building a fairly simple app in php, pretty much just allow a user to log in and then direct them to their specific content, and have them fillin some data and submit some forms,
    but their will be alot of flash video on it, and we are expecting around 130,000 simultaneous users a month on this,
    how many severs would i need to support this?
    would 3 Dell PowerEdge 1900 Dual Woodcrest machines for web app

    with a Foundry ServerIron XL - 800mbps Load Balancer

    and Dell PowerEdge 2950 Dual Clovertown for the database server

    would that be enough? we are expecting each user would use 20-35 mb a session
     
  2. Knox Administrator

    Knox

    Staff Member

    Joined:
    Jul 1, 2002
    Location:
    UK
    #2
    In terms of server power required the key figure there will be the number of users on the site at the same time - I assume you mean 130,000 unique users per month, rather than 130,000 at the same time?

    For 130,000 users per month, that works out at less than 200 users an hour on average and maybe 50 at the same time? Even a single Woodcrest server would be too powerful for that number of users.

    For static files, servers can cope with a surprising amount of data/hits - a Celeron-powered server can easily saturate a 100Mbit network connection so I wouldn't worry about the amount of flash involved, other than making sure you have a large enough bandwidth allowance to cover it.

    For reference, these forums are running on two dual P4 Xeon servers for PHP and a dual P4 Xeon + RAID 5 server for the db and that setup can cope with approx 5,000 users online at the same time. vBulletin is quite a complex PHP site with lots of database queries so a less complex site would allow far more users online at the same time.
     
  3. X1Lightning thread starter macrumors 6502

    X1Lightning

    Joined:
    Feb 19, 2007
    #3
    thank for the quick reply

    the employer wants to make sure that if 130,000 people log into the site on the same day its not going to crash the site. so i need to have it up to par for that, even if there will never be that many people on it.
     
  4. Knox Administrator

    Knox

    Staff Member

    Joined:
    Jul 1, 2002
    Location:
    UK
    #4
    Right, I see. The calculations could get a bit complex, depending how much information you have about the likely behaviour of the users.

    * How are the users distributed geographically? e.g. would all those 130k users use the site during 9am - 5pm in a single timezone, or would they be spread throughout a 24 hour period? Would there be 'burst' periods where a greater than average number of people would be using it?

    * How long would a single 'session' last, how many PHP pages would be loaded, how many db queries per page?

    * Does the flash have to be served from the same servers as the PHP pages or could different servers be optimised for different purposes?

    * Do you (or whoever would be setting the servers up) have experience of server optimisation? e.g. using lighttpd in place of Apache, eAccelerator for PHP - things like that can make a huge difference.

    The site itself might be able to be optimised as well, but that partially depends whether your time is worth more than the cost of getting larger servers.
     
  5. X1Lightning thread starter macrumors 6502

    X1Lightning

    Joined:
    Feb 19, 2007
    #5
    They are spread out all over the United States and Canada, and their could be burst periods, but we can't say for sure.

    well a user could be on 15 min, or could be on all day, depends on how many of the presentions they want to watch and after each the system has to log that the user watched it and send them a survey.

    no that can be served from another server, i just need to have it somwhere
    my original thoughts where to have several servers cloned and have a load balancer in front to to keep everything stable
    no we don't have any experience with those tools, and we dont have alot of time to get it setup, so i either have to find an expert to set it up or just have enough hardware to handle it. but i'm playing a guessing game as to what i need, and the boss is not going to be happy if its not stable.
    plus down the road they want to have a forum similar to this, and a live chat for x number of users.

    so... do you think 3 of them dells are going to be enough? or should i be looking at more?
     
  6. Knox Administrator

    Knox

    Staff Member

    Joined:
    Jul 1, 2002
    Location:
    UK
    #6
    Unfortunately it is partially a guessing game as you said. That setup is a powerful setup and I don't think it would have an issue serving the PHP & images for a site with 130,000 visitors a day. (In fact I'm pretty sure you could get away with much less but if you want to be absolutely sure then I understand if you don't want to risk it).

    One concern I would have is the potential for a large number of flash videos being loaded in a short space of time. Worst case scenario - 130k users loading 30MB each is 3.8TB, spread evenly over a whole business day (11 hours) would give an average of 790Mbit/s. Taking burst periods into account that could be well over 1Gb/s. That is a huge amount of bandwidth - if that is really possible then you would most likely need additional servers to serve the videos, or use one of the specialised content hosting networks (Cachefly, Panther Express, Amazon S3, Akamai). Either way, serving 4TB+ a day will cost a fortune.

    In an ideal world you would be able to put the site online with minimal hardware & network capacity, observe how it handled on that setup and gradually increase as required. I would be careful about the estimated numbers given - sometimes people can exaggerate them without realising the consequences so best to make sure they are realistic before commiting to anything expensive.

    However, if you are building a site that really will get 130,000 users and transfer 4TB on its launch day I would say that finding someone who has experience of large sites would be a very good idea! :)
     
  7. X1Lightning thread starter macrumors 6502

    X1Lightning

    Joined:
    Feb 19, 2007
    #7
    Thanks for your input, i think i might have to find an expert on this, don't really want to screw this up. :eek:
     
  8. ChrisA macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #8
    Yes, Way overkill. If you are serving static pages there is not much for a server to do. Just copies data from disk to the network. What you may want to be concerned about is redundancy so you can stay up even if a server fails. The hardest part of this is the database server and getting it to fail over properly.

    If you are planning to serve hundreds of megabytes per second bandwidth will be your biggest expense

    How did you pick those servers?
    Here is something with a LOT more throughput per inch of rack space. A much better web server I think.
    http://www.sun.com/servers/coolthreads/se_t1000/index.xml

    What you get is twice as many "cores". Each is slower but the job is I/O bound so a fast core is a waste. Better to have twice as many each using 1/4 the power.

    Also this server is four gigabit Ethernet ports.

    Don't discount Sun's "Lights out management" feature. Using it I was able to do things lie re-boot and run diagnosis from my desk or remotely over the Internet.

    You might need to thing about storage too. Some kind of Disk array I'd assume? How t connect it? Is NAS over gigabit Ethernet fast enough? Likely is.
     

Share This Page