1、 the use of high performance server, high performance and high efficiency of the database programming language, and high performance Web container. These solutions, to some extent, mean greater investment.1, HTML staticIn fact, we all know, the highest efficiency and the minimum consumption is pure
2、static HTML pages, so we make our website page static page to achieve the most simple method is the most effective method. But for a lot of content and frequent updates to the site, we can all go one by one to achieve manually so there, our common information system CMS, as we visited each portal si
3、te news channel, even they are through other channels, information release system to manage and realize the information release system can realize the most simple information input can automatically generate static pages, with channel management, authority management, automatic capture and other fun
4、ctions, for a large site, has a set of efficient and manageable CMS is essential.In addition to the portal and information release type website, for community website interactivity demanding, as far as possible static is a necessary means to improve the performance of the community in the post, the
5、static and real-time updates when re static also use a lot of strategies, like Mops a is the use of such a strategy, so is the community NetEase.At the same time, HTML static is also a means of using some cache policies. For the applications that frequently use database queries in the system, but th
6、e content updates are very small, we can consider using HTML static to implement. For example, in the public forum forum set information, this information can be the mainstream of the current forum management background and stored in the database, this information is actually a lot in front of the p
7、rogram call, but the update frequency is very small, can be considered to be part of the contents of this background when the static, thus avoiding a large number of database access request.2, the picture server separationYou know, to the Web server, whether it is Apache or IIS or other containers,
8、the picture is the consumption of resources, so it is necessary for us to the picture and page separation, which is basically a large site will adopt a strategy, they are independent, and even a lot of Taiwan image server. Such an architecture can reduce the server system pressure to provide page ac
9、cess requests, and ensure that the system does not crash because of picture problems.In the application server and image server, you can configure different optimization, such as Apache in the configuration of the ContentType can be as little as possible to support, as little as possible to ensure t
10、he system LoadModule, higher consumption and efficiency.3, database cluster, library table hashLarge sites have complex applications, these applications must use the database, so in the face of a large number of access to the database, the bottleneck will be revealed soon, then a database will soon
11、be unable to meet the application, so we need to use the cluster database or table hash.In terms of database clustering,Many databases have their own solutions, Oracle and Sybase have a very good program, commonly used MySQL Master/Slave are similar, you use what kind of DB, refer to the correspondi
12、ng solution to the implementation.The above mentioned database cluster due to the structure, cost and expansion will be the DB type restrictions, so we need to improve the system architecture to consider from the application point of view, table hash solution is commonly used and most effective.We i
13、nstall the business and application or function module in the application database separation, different modules corresponding to different database or table, then the smaller database for a page or hash function according to certain strategies, such as user table, table hash according to user ID, s
14、o it can improve system performance and low cost and has a good scalability.The Sohu forum is the use of such a framework, the database user settings, and separate forum posts and other information, and then to the post, the user in accordance with the plate and ID hash tables in the database, the e
15、nd can be simple in configuration files can make the system with the increase of a low cost database in supplement the performance of the system.4, cacheThe word cache has come into contact with technology and has been used in many places. Caching in Web architecture and web development is also impo
16、rtant. Here are the two basic caches. Advanced and distributed caching is described later.The cache architecture, more familiar to Apache people can know that Apache provides its own cache module, the Squid module can also use the external cache, these two methods can effectively improve the respons
17、e ability to access Apache.Web application development cache, available on the Linux Memory Cache is a commonly used cache interface, can be used in the development of web, such as when using Java development can call MemoryCache on some data cache sharing and communication, some large communities u
18、sing this architecture. In addition, in the use of web language development, all kinds of languages have their own caching modules and methods, PHP has Pear Cache module, Java more,.Net is not very familiar with, I believe there must be.5, mirrorThe mirror is a large site used to improve the perform
19、ance and data security, mirroring technology can solve different network access providers and area user access speed difference, such as the difference between ChinaNet and EduNet has prompted a lot of websites in the education network structures in the mirror site, data update or update. In terms o
20、f the details of mirror images, this is not too elaborate, and there are many professional ready-made solution architectures and products available. There are also cheap ideas that can be implemented by software, such as Rsync on Linux.6 、 load balancingLoad balancing will be a high-end solution for
21、 large web sites addressing high load access and a large number of concurrent requests.Load balancing technology has developed for many years, there are many professional service providers and products can choose, I personally contacted a number of solutions, of which there are two architecture for
22、you to make reference.(1) hardware four layer switching;The fourth layer exchange uses the header information of third layers and fourth layers of information packets, and identifies the service flow according to the application interval, and the service flow of the whole interval section is allocat
23、ed to the appropriate application server for processing.The fourth layer exchange function is like virtual IP, pointing to the physical server. The business it transmits is subject to a variety of protocols, such as HTTP, FTP, NFS, Telnet, or other protocols. These services require complex load bala
24、ncing algorithms based on physical servers. In the IP world, the business type is determined by the terminal TCP or the UDP port address, and the application interval in the fourth layer switching is determined by the source and terminal IP addresses, the TCP and the UDP ports.Switch products in fou
25、r layers of hardware,There are a number of well-known products to choose from, such as Alteon, F5, etc., these products are expensive, but value for money, can provide excellent performance and flexibility of management. Yahoo China was close to 2000 servers, using only three or four sets of Alteon.
26、(2) software four layer switching;As you all know, the principle of the hardware four layer switch, the four layer exchange of software based on the OSI model came into being. The solution is consistent, but the performance is slightly worse. However, to meet a certain amount of pressure or ease of
27、effort, some people say that the software implementation is actually more flexible, processing capacity depends entirely on your ability to configure the familiar.We can use the four layer exchange software commonly used on the Linux LVS LVS Linux Virtual is to solve Server, he provides real-time di
28、saster response heartbeat based on heartbeat scheme, improve the robustness of system, at the same time for the virtual VIP configuration and management function of flexible, can meet various application requirements, the distributed the system is essential.A typical use of load balancing strategy i
29、s based on the exchange of software or hardware of the four layer structures of the squid clusters, this idea in many large websites including search engines are used, so the architecture of high performance and low cost and strong expansion, to increase or decrease the structure of the inside nodes are very easy.For large websites, each of the methods mentioned earlier may be used at the same time. It is easy to introduce here. In the process of implementation, many details still need to be learned and understood. Sometimes a small squid parameter or Apache parameter settin
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1