B
Benjamin Joldersma
Hello all,
My company is installing a Bluecoat caching machine to help serve some
of our dynamic content. This is fine for free documents, but we have
to make a minor architectural tweak for the documents that require
authorization.
Our solution is to run the requests through an HttpModule that
determines if the request is cacheable, and the user is authorized to
view it (if the document is not cacheable, it is just processed
regularly and bypasses the bluecoat machine.) Assuming the user is
authorized, the HttpModule generates a System.Net.WebClient instance,
and requests the document from the cache machine, which manages the
private origin servers. We then take the stream from the OpenRead
method, and ReadToEnd directly into the Response buffer.
Preliminary tests seem reasonable, but I am in my gut a bit concerned
about scalablity.
Is this the fastest way we can retrieve a document? Would it be
faster/ more performant to open a socket ourselves and avoid the
overhead of the WebClient class?
Is there a better way to transfer whole documents from a private
server to a public server, a la Response.WriteFile, but via a URI
instead of a physical file path?
Thanks in advance for any feedback.
Benjamin Joldersma,
Sr. Software Engineer,
Citadel Media, Inc.
My company is installing a Bluecoat caching machine to help serve some
of our dynamic content. This is fine for free documents, but we have
to make a minor architectural tweak for the documents that require
authorization.
Our solution is to run the requests through an HttpModule that
determines if the request is cacheable, and the user is authorized to
view it (if the document is not cacheable, it is just processed
regularly and bypasses the bluecoat machine.) Assuming the user is
authorized, the HttpModule generates a System.Net.WebClient instance,
and requests the document from the cache machine, which manages the
private origin servers. We then take the stream from the OpenRead
method, and ReadToEnd directly into the Response buffer.
Preliminary tests seem reasonable, but I am in my gut a bit concerned
about scalablity.
Is this the fastest way we can retrieve a document? Would it be
faster/ more performant to open a socket ourselves and avoid the
overhead of the WebClient class?
Is there a better way to transfer whole documents from a private
server to a public server, a la Response.WriteFile, but via a URI
instead of a physical file path?
Thanks in advance for any feedback.
Benjamin Joldersma,
Sr. Software Engineer,
Citadel Media, Inc.