473,473 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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
Sep 27 '05 #1
4 1427
windandwaves wrote:
b. what is a lot?
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.
c. are there any techniques to reduce the load on the server (e.g. changing
PHP files into HTML ones)?
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.
d. is there a way to measure server load and calculate expected load with X
number of visitors?


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.

Sep 28 '05 #2
Chung Leong wrote:
windandwaves wrote:
b. what is a lot?


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.
c. are there any techniques to reduce the load on the server (e.g.
changing PHP files into HTML ones)?


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.
d. is there a way to measure server load and calculate expected load
with X number of visitors?


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.


might try that... brilliant.

one more question: if I add include_once("library/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
Sep 28 '05 #3
windandwaves wrote:
might try that... brilliant.

one more question: if I add include_once("library/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.


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.

Sep 28 '05 #4
On Wed, 28 Sep 2005 09:37:12 +1200, "windandwaves" <wi*********@coldmail.com>
wrote:
d. is there a way to measure server load and calculate expected load with X
number of visitors?


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 :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Sep 28 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Terje Slettebø | last post by:
To round off my trilogy of "why"'s about PHP... :) If this subject have been discussed before, I'd appreciate a pointer to it. I again haven't found it in a search of the PHP groups. The PHP...
4
by: Dave Theese | last post by:
Hello all, I'm trying to get a grasp of the difference between specializing a function template and overloading it. The example below has a primary template, a specialization and an overload. ...
2
by: bq | last post by:
Hello, This post is really two questions. Question 1: What is the current status on a revision of ISO C++, specifically regarding plans for overloading composite operators? Some people in this...
15
by: Michael Rybak | last post by:
hi, everyone. I'm writing a 2-players game that should support network mode. I'm now testing it on 1 PC since I don't have 2. I directly use sockets, and both client and server do...
39
by: zeus | last post by:
I know function overloading is not supported in C. I have a few questions about this: 1. Why? is it from technical reasons? if so, which? 2. why wasn't it introduced to the ANSI? 3. Is there any...
2
by: uday | last post by:
Does C supports overloading. I am thinking no. But some people are saying yes. If yes how. Please answer with examples. Also in c++ size of empty class is one. why. and what are the default...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
8
by: Wayne Shu | last post by:
Hi everyone, I am reading B.S. 's TC++PL (special edition). When I read chapter 11 Operator Overloading, I have two questions. 1. In subsection 11.2.2 paragraph 1, B.S. wrote "In particular,...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.