I'd use Apache as the web server and then use Tomcat/OpenBD through
Apache by using AJP proxying. The OpenBD installer can get that all
setup easily for you.
As for serving content, I'd use the mod_sendfile module for Apache. You
usually have to build it from source which is easy on *nix systems,
although you can find binaries for Win on the internet. Basically,
instead of using cfcontent, you do what you need to do to authenticate
the request in the CFML engine and then set some request headers (using
cfheader). At this point, the request stops at the CFML engine level
and mod_sendfile in Apache looks for any requests that have these
specific headers in it. If the headers exist, then sendfile (now this
at the Apache level) takes over the request and the *web server* (not
the CFML engine) serves that file specified in the header data. Those
special headers are stripped from the request before it's sent to the
user so there isn't any security issues. Remember Apache can handle
hundreds (maybe thousands depending on you server/setup) of requests at
a time and is able to spawn new workers easily. With Tomcat/OpenBD, you
are limited by the total number of workers available to Tomcat (usually
10-20) and those workers don't become available until the CFML engine is
done streaming the file.
I by no means have had the similar numbers in the terms of usage like
you do on my sites, but we did in the past use cfcontent to serve
"protected" images to authenticated users. It would take any where from
40-45 seconds to serve 100 images (of various sizes) using cfcontent.
Switching to use mod sendfile cut that time down to about 10 seconds for
100 images. Now, the bulk of the request is to send the file (bandwith)
instead of "authentication" time.
I'd try out mod sendfile if I were you:
http://tn123.ath.cx/mod_xsendfile/
.Peter
Halo Maps said the following on 17/06/10 15:39:
Greetings,
I am hoping to pick some of your brains. I find myself in a quandary. If
you will indulge me I will explain the situation as briefly as I can.
We current have a website, several really, that are fairly heavily
trafficked about 12 - 18 million pages per month primarily used to obtain
video game maps and assets for the games. The website is not the issue
since we store the actual files for download on remote servers and link
people to them for download via FTP. For the past 3 years this has been
working fairly well. We average over 15,000GB / Month in file traffic and
serve an average of 350,000 Files /month using this method.
We have recently upgraded our remote servers to Athlon 64 X2 3400+, DualCore
64 Bit, 2x 1.8 GHz, 4 GB DDR2-RAM Win2008 X64 Web IIS7 with substantially
more bandwidth availability. Since it is a newer OS I was unable to use the
old CF5 installation on the remote server and since only needing minimal
functionality installed Tomcat and Open BlueDragon for the CFML engine.
This seems to work as before since we only use cf on the remote servers to
check if the file exists before sending them to the ftp.
In other applications I routinely use cfcontent to serve protected files on
extranet applications however the traffic ( 10-20 files/day) is nowhere near
as rigorous as will be required here with 12,000 per day of 40Meg average
per file. I am considering serving the files now through cfcontent via HTTP
instead of FTP for a couple of reasons. 1) because most Internet Security
programs block FTP and we have to help people (mostly kids) open the port
and 2) to prevent direct linking to the files because this endeavor is
funded by ads on the website (and my wallet).
I know the most efficient way to serve this quantity and size of files is
via ftp but what I don't know is what is required by the various CF engines
AdobeCF, OpenBD, Bluedragon, Ralio to serve up the same via HTTP. Will our
new server hardware handle that kind of HTTP file traffic (I suspect so),
will OpenBD/Tomcat be up to the task or will I need a different CFML engine?
Essentially what I need to know is what it would take to routinely serve
that many/size files through the CF engine. I don't want to go down this
road and find that people are having problems downloading because the CF
engine / Web server can't keep up. Has anyone had experience with this and
can you offer some advice?
Dennis Powers
UXB Internet - A Website Design& Hosting Company
P.O. Box 6028
Wolcott, CT 06716
203-879-2844
http://www.uxbinternet.com
--
Open BlueDragon Public Mailing List
http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon
online manual: http://www.openbluedragon.org/manual/
mailing list - http://groups.google.com/group/openbd?hl=en