views:

75

answers:

1

Hello

I would be surprised if this is possible, but you never know.

Is there a way in which I could prioritise ASP.NET requests? For example, if the request is a NEW request (coming from Location X) I would like it to take priority over a request coming from a known location.

This will be running under IIS 7 so can I make use of the integrated pipeline to pre-process requests before they take threads out the ThreadPool?

Hmmm. Any feedback welcomed, even if it's to say No!

Thanks Duncan

+2  A: 

Hi Duncan,

I don't think what you're after is possible in the truest sense of what you're asking for, but it might be possible to 'simulate' what you're after at the application level. John's right, they're processed first come, first served. But you might be able to give some kind of priority to your web application by setting a cookie for all visitors, and checking if that cookie is present before you render your homepage. If it is not present, you could assume that the request is new and therefore continue to render your homepage (or whatever). If it is present, you might choose to redirect them to another page (or perhaps a cached copy of your page).

Like I said, this isn't the 'truest' sense of what you are after, but if your homepage is particulary process intensive right now, and you want some way to separate recurring visitors from new visitors, this might do the trick.

Since you've asked, though - I'd have to ask you why it is necessary in your implementation to prioritise requests as you have mentioned. Is load on your web server a problem, and you want to appear more responsive to new customers?

Just hazarding a guess - interesting question, though! :)

Best,

Richard.

Richard
That's precisely it. During times of heavy load, I'm more interested in new customers than those who have already bought. It's brutal I'll admit, but just wanting to know if it's possible!
Duncan