[thelist] Front page idea..

Daniel J. Cody dcody at oracular.com
Mon Apr 3 13:49:13 2000


So, I'm 'watchin the game, havin a bud' saturday(badgers were sooo
close!) and was thinking that I was kinda pissed off that the front page
was taking so long to load on Friday after jeff's spring cleaning thing
got forwarded around.

We pushed about 9500 page views that day(our second biggest one day
total ever) and even though one person reported getting a CF error,
things were served pretty decent, except it was a bit on the slow side
at times.

So, I've been doing some bits o' benchmarking here on my own over the
past two days, and our front page is really fat on the DB calls(hence
its slow loading at times). Specifically, I've noted that it starts
taking above 1000milliseconds when we hit 30 concurrent DB connections.
On 4am Sunday morning, it will take about 350ms on average.

So anyway, back to the point... I'd like to take a lot of the load off
that front page without sacraficing features and think I've got a way to
do it. Try to follow along and offer your opinion:

Run a cron job(running CF on Unix gets better everyday :) that basically
does a 'lynx -source http://evolt.org >
/home/evolt/main_html/index.html' every 5 minutes. This creates a static
version of our dynamic page and saves DB connections(and CPU cycles)
untill someone actually clicks a link to an article.(I mean, whats the
point of doing 15 DB calls every time someone loads the frontpage for
people that just scan the frontpage for new topics). Also, because its
an .html page, it will render *MUCH* faster than a dynamic CF page. This
is the *KEY*. We could get 100K hits a day on our front page with the
current setup, and apache wouldn't break a sweat. Saving CF for the
other X% of page views that actually request a dynamic page is A Good
Thing.(tm)

Now, just to make it clear that I'm not un-confident with our current
setup. I'm just always thinking of ways to make our website more
responsive to our viewers.

So, check it out for yourself at http://evolt.org/dan.html - that is the
version running from a cron job and static HTML. Everything works. If we
set index.html instead of index.cfm as our front page, no one would even
notice.

So, anyone see problems with this approach? Roadblocks? Popsicles?
Issues? If not, I really think it could be a cool lil hack and I'd like
to implement ASAP.

weee!

.djc.