lot of hits in one go - server overloading questions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • windandwaves

    lot of hits in one go - server overloading questions

    Hi Folk

    I am making a website that is going to get lots of hits in one go (they will
    be doing lots of advertising). I am a bit scared the whole thing will fall
    over because it will get too many hits at one time. My questions are:

    a. has anyone got any experience with this?
    b. what is a lot?
    c. are there any techniques to reduce the load on the server (e.g. changing
    PHP files into HTML ones)?
    d. is there a way to measure server load and calculate expected load with X
    number of visitors?
    e. etc...

    TIA

    - Nicolaas


  • Chung Leong

    #2
    Re: lot of hits in one go - server overloading questions

    windandwaves wrote:[color=blue]
    > b. what is a lot?[/color]

    No easy answer. Depends a lot on the hardware and bandwidth, as well as
    the nature of the site. Some years ago I was on a team building the
    launch site for a certain next-generation video game console. The
    requirements called for 20 million hits on the first day IIRC.
    [color=blue]
    > c. are there any techniques to reduce the load on the server (e.g. changing
    > PHP files into HTML ones)?[/color]

    Zend sells a number products that are supposed to improve performance.
    Code execution speed usually isn't a big factor though. Scalability is
    usually limited by the database. So I would avoid hitting the database
    as much as possible. For example, if you have a drop-down list of US
    states, don't populate it with data from the database. It's quite
    unnecessary as the list isn't going to change anytime soon.
    [color=blue]
    > d. is there a way to measure server load and calculate expected load with X
    > number of visitors?[/color]

    For quotable numbers, you really need a commercial tool. LoadRunner
    from Mercury Interactive and SilkTest from Segue come to mind.

    For a very rough estimate, in the past I've done something as simple as
    sticking <script> location.reload () </script> into my page footer and
    opening up a bunch of browser windows.

    Comment

    • windandwaves

      #3
      Re: lot of hits in one go - server overloading questions

      Chung Leong wrote:[color=blue]
      > windandwaves wrote:[color=green]
      >> b. what is a lot?[/color]
      >
      > No easy answer. Depends a lot on the hardware and bandwidth, as well
      > as the nature of the site. Some years ago I was on a team building the
      > launch site for a certain next-generation video game console. The
      > requirements called for 20 million hits on the first day IIRC.
      >[color=green]
      >> c. are there any techniques to reduce the load on the server (e.g.
      >> changing PHP files into HTML ones)?[/color]
      >
      > Zend sells a number products that are supposed to improve performance.
      > Code execution speed usually isn't a big factor though. Scalability is
      > usually limited by the database. So I would avoid hitting the database
      > as much as possible. For example, if you have a drop-down list of US
      > states, don't populate it with data from the database. It's quite
      > unnecessary as the list isn't going to change anytime soon.
      >[color=green]
      >> d. is there a way to measure server load and calculate expected load
      >> with X number of visitors?[/color]
      >
      > For quotable numbers, you really need a commercial tool. LoadRunner
      > from Mercury Interactive and SilkTest from Segue come to mind.
      >
      > For a very rough estimate, in the past I've done something as simple
      > as sticking <script> location.reload () </script> into my page footer
      > and opening up a bunch of browser windows.[/color]

      might try that... brilliant.

      one more question: if I add include_once("l ibrary/functions5.php" ) to a
      bunch of scripts (with a myriad of functions), does that add a lot of
      weight? I am adding these by default, because then I do not have to think
      which page needs then and which page does not.

      Thank you for the detailed answer.

      - Nicolaas


      Comment

      • Chung Leong

        #4
        Re: lot of hits in one go - server overloading questions

        windandwaves wrote:[color=blue]
        > might try that... brilliant.
        >
        > one more question: if I add include_once("l ibrary/functions5.php" ) to a
        > bunch of scripts (with a myriad of functions), does that add a lot of
        > weight? I am adding these by default, because then I do not have to think
        > which page needs then and which page does not.[/color]

        It's unlikely to have a noticeable effect. The server can read and
        parse the file far faster than it can transmit output data through the
        network. Any overhead is through masked by the low throughput.

        Scalability issues are usually caused by resource contentions as oppose
        to cumulation of independent loads. Usually that resource is the
        database. For example, while one request is writing to a table,
        requests reading from the same table might need to wait for that
        operation to finish before proceeding. Another common contention
        problem in PHP involve session locking. Simultaneous requests from the
        same user (e.g. from a frameset) could end up blocking each other if
        each tries to open the user's session. Not really a scalability issue
        but could be mistaken as one.

        Comment

        • Andy Hassall

          #5
          Re: lot of hits in one go - server overloading questions

          On Wed, 28 Sep 2005 09:37:12 +1200, "windandwav es" <winandwaves@co ldmail.com>
          wrote:
          [color=blue]
          >d. is there a way to measure server load and calculate expected load with X
          >number of visitors?[/color]

          Apache comes with a simple benchmarking tool named "ab" which you can use to
          throw lots of (concurrent) requests at a single URL and get some timing
          information back. It's not a very realistic test, but gives you an initial
          indication of how the site may perform.
          --
          Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
          http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

          Comment

          Working...