Google Answers Logo
View Question
 
Q: Even more Web sites ( Answered 4 out of 5 stars,   3 Comments )
Question  
Subject: Even more Web sites
Category: Computers > Operating Systems
Asked by: mongolia-ga
List Price: $10.00
Posted: 06 Sep 2004 06:14 PDT
Expires: 06 Oct 2004 06:14 PDT
Question ID: 397423
If someone were to develop  a web site which would ultimately be accessed by 
 hugh number of people (Lets say more than 20000 hits per day)
what programming language and Operating system would you recommend assuming
it was to run off 1 server.

PS I am not looking for a detailed answer at this time Just some high level 
possibilities.

 Cheers
 
 Mongolia
Answer  
Subject: Re: Even more Web sites
Answered By: leapinglizard-ga on 06 Sep 2004 07:39 PDT
Rated:4 out of 5 stars
 
Dear mongolia,

Your best choice for a high-traffic, high-availability web server is a
UNIX-type operating system such as Linux or FreeBSD. Most consumers
are familiar with Windows, which operates over 90% of the world's
desktop computers. The back-end computing resources of industry,
government, and academe, however, are more typically powered by
heavy-duty multiprocessor systems that run a UNIX-type system. For
some years, UNIX-type operating systems have also been available on
the desktop. The most popular of these are Linux and FreeBSD. Other
flavors of UNIX include IBM's AIX, HP's HPUX, Apple's Darwin, the
open-source OpenBSD and NetBSD distributions, and Sun's Solaris.

For web traffic in the range of 20,000 to 100,000 hits per day, a
late-model single-processor computer might just suffice, but you are
better off looking at a dual-processor or four-way machine in the
interest of long-term reliability and expansion capacity. There are
versions of Linux and FreeBSD that run on multi-processor machines.
The FreeBSD operating system is distributed by an organization of the
same name, while Linux is distributed by many companies, foremost
among them Red Hat, Mandrake, Suse, and Debian.

Red Hat Linux
http://www.redhat.com/

Suse Linux
http://www.suse.com/us/

Mandrake Linux
http://www.mandrakelinux.com/en-us/

Debian Linux
http://www.debian.org/

FreeBSD
http://www.freebsd.org/

All of these distributions are available as a free web download, with
documentation and help forums aplenty online. In addition, Red Hat and
Suse sell long-term service and support contracts to enterprise
customers at modest prices.

Linux and FreeBSD not only let you keep your costs low, they are
recognized as the most powerful and robust platform for webhosting.
They are resistant to viruses, worms, trojans, remote-access holes,
and other malware in a way that Windows is not, due to the
longstanding development in UNIX technology of user separation, memory
protection, cryptography, and other security measures. Furthermore,
the source code of the UNIX-type operating systems is constantly
audited by hundreds of thousands of developers around the world,
thanks to the generous licensing provisions of their creators. Because
more pairs of eyes look at every line of code in Linux and FreeBSD,
these operating systems are more secure, more stable, and more
efficient than proprietary systems such as Windows.

The webhosting statistics collected by Netcraft, an authoritative
web-research organization, bear this out. According to the latest
Netcraft survey, 70% of webhosts run the Apache webserver, which runs
on UNIX-type operating systems, as opposed to the 23% that run
Windows.

Netcraft: September 2004 Web Server Survey [see the second line graph]
http://news.netcraft.com/archives/2004/08/31/september_2004_web_server_survey.html

Furthermore, at least eight of the top ten most reliable webhosts, as
measured by uptime polling in August, are based on UNIX-type systems.

Netcraft: Most Reliable Hosting Providers during August
http://news.netcraft.com/archives/2004/09/02/most_reliable_hosting_providers_during_august.html

Five of the top ten are Linux systems. In general, I would recommend
Linux because it enjoys the widest support in the developer community.
Bear in mind that it doesn't matter what kind of operating system your
visitors are running, since they would only be accessing the pages
transmitted by your webserver software, and not the server's operating
system. If you run the Apache webserver on an open-source UNIX-type
operating system such as Linux, you'll be in very good company.

As for the programming language, there is no straightforward answer
here. A web page is composed of a markup language known as HTML,
although only the simplest websites can get by with a collection of
static HTML files. In order to provide dynamic content, you'll want to
write a program or a set of scripts to process visitor input, access
back-end databases, and generate web pages for delivery to the front
end. In principle, this can be done in any programming language, for
just about all are capable of talking to the visitor's web browser
through the standard protocols of HTTP and CGI.

Much will depend on the technical skills and preferences of the
software developers responsible for programming your back end.
Personally, I use the C language to write my web-page processing and
generation scripts, but this is not the best choice for everyone. The
advantages of C are that it is very fast and very memory-efficient,
far more so than any high-level scripting language. However, it
requires considerable expertise to write well, and larger C systems
tend to be disorganized and error-prone. It is only appropriate for
skilled developers such as myself who are writing lightweight back-end
scripts where speed, not reliability, is the foremost criterion.

For a more robust system, I might use the high-level scripting
language Python, as I have in the past for other projects. Its large
collection of built-in libraries, many devoted to text processing and
specifically to Internet protocols, make it easy to write short but
powerful scripts for many web tasks. Its object-oriented style also
makes it easy to organize a large project into distinct units. The
other high-level scripting languages are Perl, which is very popular
but which I advise against due to the unreadable code it encourages,
and Ruby, a relatively recent Japanese entry in the scripting wars
that promises the best of all worlds.

Python Programming Language
http://www.python.org/

O'Reilly: The Source for Perl
http://www.perl.com/

Ruby Home Page
http://www.ruby-lang.org/en/

Finally, but not least importantly, there is the PHP scripting
language, which was designed primarily to generate web pages. There
are similar web-specific scripting languages such as JavaScript, but
PHP is the most general and most highly regarded of them. I have
little personal experience with PHP, but I can see its advantages.
Though not as fast as C, it is optimized for webhosting in a way that
Python and company are not. It also offers the widest range of
specialized web-page parsing and generating instructions, with
additional libraries available for the most esoteric uses. I would
trust PHP as a tool for building a large-scale web service, if only
because Yahoo has adopted it as its scripting language of choice.

Internet News: Yahoo Goes PHP
http://www.internetnews.com/dev-news/article.php/1491221

CNET: Yahoo shifts to open-source scripting
http://news.com.com/2100-1023-963937.html?tag=lh

Note that Yahoo engineers initially wrote custom web scripts in C, but
this piecemeal approach came to be unmanageable as they scaled up to
millions and billions of hits. In the very long term, then, a
specialized web scripting language such as PHP might be the right
choice.

PHP
http://www.php.net/

If you feel that my answer is incomplete or inaccurate in any way, please
post a clarification request so that I have a chance to meet your needs
before you assign a rating.

Regards,

leapinglizard

Clarification of Answer by leapinglizard-ga on 10 Sep 2004 06:01 PDT
Java is a general-purpose programming language, like C, and suffers
from many of the same drawbacks. I disagree with the comment on its
speed -- compiled Java is as fast as the equivalent C++ program -- and
then Java is an object-oriented language with a large set of
libraries. I would put it in roughly the same class as Python when it
comes to generating web content, except I'd give Python the edge.

leapinglizard
mongolia-ga rated this answer:4 out of 5 stars and gave an additional tip of: $1.00
leapinglizard

Thank you very much for your answer. Just one quick point (and if you
wish I will set up a separate question) You made no reference at all
to Java
(which the commenter has) Have you anything to add to Scotru's comments.
 regarding Java
Kind regards

Mongolia

Comments  
Subject: Re: Even more Web sites
From: scotru-ga on 06 Sep 2004 08:07 PDT
 
PHP is a good choice for server side scripting if performance is
critical.  Note that Javascript is a langauge for client-side
scripting, rather than server-side.  Java (not to be confused with
javascript) is often used on both server and client sides of
applications, but it has a reputation (whether deserved or not) of not
performing as quickly.  If realiability is important you might
consider setting up a small linux high-availability cluster (see
http://www.linux-ha.org/)
Subject: Re: Even more Web sites
From: rajjesh-ga on 06 Sep 2004 21:04 PDT
 
for 20000 Page Views and more.. you could even use ASPX on any Windows
server, it should work fine :)
Subject: Re: Even more Web sites
From: answerbod-ga on 19 Dec 2004 05:25 PST
 
With respect, 20,000 hits a day is about 1,000 pages a day which is
peanuts. Start worrying when you hit several million pages a day. ;-)

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy