Re: content static for 24hrs
- From: "Sean O'Connor" <zxc1@xxxxxxxxxxx>
- Date: Tue, 31 Jul 2007 17:40:03 +0100
Thanks Anthony,
That seems to be good advice.
I think I will pursue a combination of these ideas.
-improve hardware
-good asp practice
-generate html for content pages
So would flow be?-
-xxx/yyy/zzz.htm is sent to 404.asp if it doesn't exist
-404.asp extracts querystrings (does it pick up error page from http_referer
in servervariables?)
and requests data from database. if data found the html page is created
(filesystemobject)
404.asp then redirects to zzz.htm
otherwise redirects to 404.htm. (for stats)
Another issue is a requirement for a list of most popular pages, like
bbcnews for example.
Writing each hit to a database is what springs to my mind. This will surely
hurt database performance and wouldn't be possible if pages were html?
Would this be best done using the iis logging to database?
Many Thanks Soc.
"Anthony Jones" <Ant@xxxxxxxxxxxxxxxx> wrote in message
news:eSOC2g30HHA.5160@xxxxxxxxxxxxxxxxxxxxxxx
"Sean O'Connor" <zxc1@xxxxxxxxxxx> wrote in message
news:unmaTf20HHA.3536@xxxxxxxxxxxxxxxxxxxxxxx
Thank you,some
20k visitors, 250k hits per day.
Largely content delivery, some of which will be subscription based. So
kind of session info would be required.more
There are about new 200 pages per day, but the majority of these would be
unpopular, most users only visit a page or two. The new site should be
sticky, with usage perhaps multiplying by 2-5.for
The servers are in house. The are single purpose servers.
sqlserver, w2000,sp4,pentium3,1gb ram, 2 hard drives(one for backups, 1
everything else)
web server, w2003,sp1,pentium3,1gb ram, 3 hard drives.
Yes I plan to parameterise using querystrings.
Would upgrading your servers and writing standard ASP be an acceptable
answer? We're looking at something like 15 requests per second here which
isn't a particularly amazing but those pentium 3 machines may struggle
(I've
never seen 2003 run on a pentium 3).
A goal to have in mind if you want to cache what is essentially static
content is to remove ASP from the majority of the requests for this
content
altogether. ASP performs poorly even if all its doing is copying bytes
from
an array or a file to the response. Making the majority of the responses
handled purely by IIS can significantly improve the performance of your
site.
The simplest is as Bob has said build the content on a scheduled basis.
The
downside to that approach is that the matrix of content you build could be
quite large and potentially much of it may not be visited at all.
Here is another option:-
Lets take an example of /MyFolder/MyPage.asp?valA=x&valB=y.
We could re-arrange the URL like this:-
/MyFolder/MyPage/x/y.htm
This page won't actually exist but /folder/MyPage.asp does.
Now we have a custom 404 handler /404.asp in the root of the site.
It takes /MyFolder/MyPage from the URL that was requested and checks that
/MyFolder/MyPage.asp exists. If not it continues with a 404 response.
If it does it simply server executes /MyFolder/MyPage.asp.
MyPage.asp needs to handle the parsing of "Querystring" values from the
rest
of the path. It can then create the x/y.htm file. It sets the
response.status back to 200 OK and then chunks the content of x/y.htm to
the
client.
Any subsequent attempts to fetch this page will find a static file and be
handled purely by IIS without any ASP/SQL Server intervention at all.
This doesn't help to protect subscribed content. This technique could be
refined and expanded to cover subscribed content by using a custom ISAPI
filter if you have that option open to you (I.e. C++).
--
Anthony Jones - MVP ASP/ASP.NET
.
- References:
- content static for 24hrs
- From: Sean O'Connor
- Re: content static for 24hrs
- From: Sean O'Connor
- Re: content static for 24hrs
- From: Anthony Jones
- Re: content static for 24hrs
- From: Sean O'Connor
- Re: content static for 24hrs
- From: Anthony Jones
- content static for 24hrs
- Prev by Date: Re: content static for 24hrs
- Previous by thread: Re: content static for 24hrs
- Next by thread: Column Count -vs- Table Count performance trade-offs?
- Index(es):
Relevant Pages
|
Loading