In order to make the URL address more friendly (of course there may be other reasons), many sites use URL rewriting, such as http://www.cnblogs.com/life . Such URL rewriting is usually handled in asp.net. *.* must be mapped to aspnet_isapi.dll (C:WINDOWSMicrosoft.NETFrameworkv1.1.432aspnet_isapi.dll) in IIS, then make the corresponding configuration in web.config, and finally write the corresponding processing Program, in most cases we do it that way, and Boke Park does it the same way, and there doesn’t seem to be any problem.
However, there have been performance problems in Boke Park for a long time. Dudu and many friends in the garden have also thought of many ways to improve performance and achieved great results, but it is still not ideal. I also want to contribute, because I I like BoKe Park very much. I learned a lot in the garden. I basically read the above articles in the morning, noon and evening. It wasn’t until last night when a friend from the technical group asked me a question about URL rewriting that I suddenly realized that BoKe Park The performance issue is most likely caused by url rewriting.
My friend's question is this:
http://www.wodecity.com/food and http://www.wodecity.com/food.html (this link is now invalid) both locate the same page http://www.wodecity through url rewriting. .com/page/food.aspx , both use the same processing program. The only difference is that in order to process addresses without extensions such as http://www.wodecity.com/food , he must map *.* to aspnet_isapi. dll, and http://www.wodecity.com/food.html maps *.html to aspnet_isapi.dll. It was found that the performance of http://www.wodecity.com/food.html is better than http:// www.wodecity.com/food is ten to twenty times better. He tested it with loadrunner. He was very depressed about the result. I was also surprised at the beginning. What is the difference between *.* and *.html? *.* means that all requests for the page, including css files and all image files, are processed by the url rewriting handler written by him. , *.html does not exist, it is just a request. The problem arises here. The page http://www.wodecity.com/food must have more than 20 pictures. When requesting a page, you must use the url rewrite handler at the same time. Can it not be slow when processing so many pictures? What to do? Because they want to use URLs like http://www.wodecity.com/food , which is more friendly, they still have to use *.*. After thinking about it for a while, I told him to let your URL rewriting program not process those image files. That’s it, how to do it? There are two methods: Method 1, convert the folder where the pictures are stored into a virtual directory, and then move the mapping of the virtual directory *.*, so that his url rewriting program will not process the picture files. Of course, storing other files that do not require a URL rewriting program should be treated similarly to the image folder. Method 2 is to create a new site, such as using http://img.wodecity.com/ to store image files. The principle is the same. Yes, it all means that your url rewriting handler does not process those image files.
Everything was OK. He told me that he would go to the company to test it this morning.
In order to verify my idea, I also wrote a program to test it today. The performance is also nearly 20 times different. Good, my idea is correct.
Maybe my ideas or test results are wrong, PK is welcome here. msn:cxbsky#hotmail.com.
I also hope that this article will be helpful to the performance problems of Blog Park, because the problems in Blog Park may be very similar to those of my friend's site.
ps: When I finished writing this article, I asked my friend about the test results, and he said: "Originally, it can only support 50 people. Now it is no problem for more than 700 people."
http://www.cnblogs.com/csky/archive/2006/08/09/urlrewrite.html