Web image server

Source: Internet
Author: User

Original post: http://lovelaozang.cn/show-6789-1.html

 

Currently, many small and medium websites (especially Web 2.0 websites) allow users to upload images. If there is no good plan in the early stage, as image files increase, both management and performance bring many problems. I will give some suggestions on my own, so as to bring more valuable information.

Storage of images

What media is the image stored on? If you have enough funds to purchase dedicated image server hardware or NAS devices, it is very simple. If you have the ability to develop a file system that stores images separately, you don't have to go on.

If the above conditions are not met and you only want to store them on a common hard disk, you should first consider the actual processing capability of the physical hard disk. If the conversion rate is 7200 or 15000, the actual performance is very different. Choose ReiserFS or Ext3. How can I test it? When creating a file system, you should also consider the Inode problem. select an appropriate inode size to make a trade-off between space and speed, while preventing problems before they happen, note that the number of files in a single file system cannot exceed the limit.

Independent and independent servers

In terms of management and performance, as long as possible, try to deploy an independent image server. This is almost a common sense (but I was also told off this issue before I did a Web-oriented project ). With an independent image server or server cluster, you can perform configuration optimization on the Web server. For example, use the legendary more efficient Lighttpd.

If you do not want to synchronize all images on several machines, use NFSIn the shared mode. Pay attention to problems caused by soft and hard connections and NFSSpecific transmission speed.

Independent and independent domain names

If you need to load many images on most Web pages, pay attention to IENumber of browser connections (see the test on this issue ).

A friend asked me online a few days ago, "Why do I use another domain name for some large websites and image servers? For example, if the yimg.com domain name is used on the image server of yahoo.com? ", Rough answer: In addition to convenient management, it is easy to synchronize CDN processing, the above mentioned IEThe number of connections limit is also a consideration (I do not know for other reasons, please Yahoo! The other one I did not take into account is the Cookie factor. I attended the post from Gao chunhui downstairs]

14 Yahoo Web Optimizations

With regard to 14 optimization rules proposed by Yahoo's YSlow tool, it is recommended that each Web maintenance personnel be backed up, of course, we should also look at it dialectically-the pages that introduce these 14 rules can only get more than 70 points... there is a conflict between the ninth and the independent domain name mentioned above. The actual situation depends on your Benchmark and specific requirements.

Effective use of Client Cache

UI of many websitesIn order to achieve some visual effects, the designer will apply a large number of images to some page modules that users need to frequently access. In this case, the research shows that it is necessary to set Expires Header for this type of object on the Web server for websites with high user viscosity. This saves a lot of bandwidth, the cost is also reduced. By the way, you need to add a simple rule to filter out the verification code.

Server Cache

In China, CDN can also be played well with money. A package of storage services such as Amazon S3 has not yet appeared in China. Therefore, it is necessary to make full use of the server-side Cache. Squid is used as the reverse proxy server. It should be said that the image buffering effect is acceptable. The Ncache contributed by Sina's technical team has been evaluated for better results.

High resolution image problems

If the website has a large number of high-resolution images, it is necessary to consider deploying IIPImage or similar software.

Operation Problems

Many large websites do not process images uploaded by users, and many BMP images are displayed on the result page.Format Image (I personally think any website has BMPThe format of images is shameful)... this is totally a mistake in the operation strategy. Find a programmer and spend a little time writing an image processing module to convert the screenshots. The cost may be far lower than the cost of storage, and the user can access the image again, the quality may not have any loss, and the browsing speed is undoubtedly much better. The processing method is more acceptable and self-evident.

FROM: http://www.dbanotes.net/web/web_image_server.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.