Last post Dec 29, 2011 12:25 AM by atconway
Dec 16, 2011 05:56 AM|mumairkhan|LINK
There are multiple servers, user have to send requests to get file as follows
to get a file: http://server1.com/image1.png
to get another file: http://server2.com/image10.png
If any of servers is down user face problems, I want to develop a middle tier "server3.com" that will do some cache sort of a thing.
instead of sending requests to different servers user will send request to my caching server
http://server3.com/image1.png now this server3 will check if it already has image1.png it will simply return the image, and if not it will download the image from
http://server1.com/image1.png and will return the image. Provided that server3 knows where to download file from
also if server3 wants to stop caching it should forward the request to server1 or server2 so that user gets the required image directly from server 1 or 2
How can I handle these webrequests from users and return image in response or forward the request?
Dec 16, 2011 05:59 AM|mumairkhan|LINK
correction: request to server3 should be like
Dec 17, 2011 06:12 AM|mumairkhan|LINK
any one please help ?
Dec 18, 2011 12:34 AM|mumairkhan|LINK
any one ?
Dec 29, 2011 12:25 AM|atconway|LINK
To be honest, this is why I typically do not spread files being stored on the filesystem across multiple servers if possible. The pain of synchronizing or emulating a load balancer for redundancy and failure, but yet not having identical servers (different
files on different servers) as such in a web farm using a load balancer makes things cumbersome. I would usually begin to rely a bit on the Networking folks to solve the 'x factor' in this equation to see what they recommend. My instinct was to point you in
the direction of the
TechNet forums for the physical design of this which might offer some more insight.
There might be some developers yet to speak up though with a solution to a similar situation in which they have been like yours. On the programming side of things you might be able to use a custom HTTP handler to determine which file to send to the response.
Your other option might be to use SQL Server as that 'central hub' to manage the storage and retrieval of files on the file system instead of caching. Using the FileStream option in SQL 2008 could be a potential solution. Have a look below: