How and why using a image handler (ashx) instead of webrelative path to display images?

Actually we only have 1 front-end server, but planning to move into a webfarm with multiple front-end server and 1 access point datastorage("SAN/SAS") to stores all the photos/videos.

Actually we simply use <img src="/images/somepath/image.jpg"> to display the image on client site. But we will not be able to do so eventually cause we are moving into webfarm and datastorage.

Someone told me that i need to create a "Image Handler (ashx)" who return the images.

What about the performance and memory load of using a image handler to display images. And what about "file lock" if 2 front-end server try to send back the same images?

Any example?

Thanks!!!
LVL 10
jabcocoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AswinKrishnanCommented:
I found an interesting article for your answer, please go through it

http://www.wrox.com/WileyCDA/Section/id-291916.html


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jabcocoAuthor Commented:
Perfect, thanks...
would you also told me why i should use "ashx" intead of a normal relative server path to display images?
0
AswinKrishnanCommented:
ashx basically means asp.net simple handler files, if you use image handlers then you can prevent Bandwidth leeching,Compress the images there by save bandwidth,reduce the load on the Server and reduce the page load time.

Bandwidth leeching happens when you have an image hosted on your site and another site links directly to your image using an <img> tag. The page serves from the other site, but the image is served from yours. Browsers typically include the name of the host that obtained the request. Images that are requested from your web server by a page hosted elsewhere will have a referrer header that doesn't match your site's URL.
0
jabcocoAuthor Commented:
Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.