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 |