Building the Tens Web Access architecture

Source: Internet
Author: User

1. HTML Static

In fact, we all know that the most efficient, the least expensive is the pure static HTML page, so we try to make the page on our site using static pages to achieve, the simplest method is actually the most effective method. But for a lot of content and frequently updated sites, we can not all manually to achieve, so we have a common information distribution system CMS, like we often visit the various portals of the news channel, and even their other channels, are through the information distribution system to manage and implement, Information Publishing system can achieve the simplest information input automatically generated static pages, but also with channel management, rights management, automatic capture and other functions, for a large web site, has a set of efficient, manageable CMS is essential.

In addition to the portal and the type of information publishing site, for the interactive requirements of the Community type site, as much as possible static is also to improve the performance of the necessary means, the community posts, articles in real-time static, there are updates and re-static is a lot of use of the strategy, like Mop is a hodgepodge of the use of such strategies, such as the NetEase community. At the same time,HTML Static is also the use of some caching policies, for the system frequently using database queries but the content of small updates, you can consider the use of HTML static, such as forum public settings information, This information is currently the mainstream forum can be managed in the background and stored in the database, which is actually a lot of the foreground program calls, but the update frequency is very small, you can consider this part of the background update the time to static, so as to avoid a large number of database access requests.

2. Image Server Separation

as you know, for Web Server, whether it is Apache,IIS or other containers, the picture is the most resource-intensive, so we have to separate the picture and the page, which is basically a large web site will adopt the strategy, they have a separate picture server, Even a lot of picture servers. Such a architecture can reduce the server system pressure to provide page access requests, and can ensure that the system does not crash due to picture problems, on the application server and picture server, can be different configuration optimization, such as Apache in the configuration ContentType can support as little as possible. LoadModuleto ensure higher system consumption and execution efficiency.

3. database cluster and library table hashing

Large sites have complex applications that must use databases, and in the face of massive access, The bottleneck of the database is quickly revealed, and a database will soon be unable to meet the application, so we need to use a database cluster or a library table hash. In the database cluster, many databases have their own solution, oracle, sybase

common Mysql provided by Master/slave is a similar scenario, what kind of db db Id for the table hash, so that the system can be low-cost to improve the performance and good scalability. sohu forum is the use of such a framework, the Forum users, settings, posts and other information database separation, and then the post, the user according to the plate and Id to hash the database and table, finally can be configured in the configuration file simple configuration will allow the system to add a low-cost database at any time to supplement system performance.

4. Cache

The word cache has been touched by technology, and caches are used in many places. Caching in the Web site architecture and Web development is also very important. Here we first describe the two most basic caches. The advanced and distributed caches are described later. Architecture cache, people familiar with Apache can know that Apache provides its own cache module, can also use the addition of Squid module for caching, both of which can effectively improve Apache 's access response capabilities.

website program development cache, Linux the Memory cache web used in development, for example with Java when developed, you can call Memorycache Some of the data is cached and shared, and some large communities use such architectures. In addition, when using the web language development, all languages have their own cache modules and methods, Php There are Pear cache module, java more, . Net is not very familiar with, I believe there must be.

5. Mirror

mirroring is often used by large web sites to improve performance and data security, mirroring technology can address the different network access providers and regions brought by the user access speed differences, such as The difference between chinanet and edunet has prompted many websites to build mirror sites within the education network, with data scheduled to be updated or updated in real time. In terms of mirror detail technology, this is not too deep, there are many professional ready-made solution architectures and products to choose from. There are also inexpensive ways to implement software, such as the tools of rsync on Linux .

6. Load Balancing

load balancing will be the ultimate solution for large web sites to address 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 be selected, I personally contacted a number of solutions, including two architecture can give you a reference.

7, hardware four layer Exchange

The fourth layer Exchange uses the header information of the third layer and fourth layer packets, according to the application interval to identify the business flow, the entire interval segment of the business flow distribution to the appropriate application server for processing. The fourth level switching function is like a virtualIp, point to the physical server. It transmits a variety of business compliance protocols that haveHTTP,Ftp,Nfs,Telnetor other agreements. These operations are based on physical servers and require complex load balancing algorithms. In theIpWorld, Business type by terminalTcporUdpport address, the application interval in the fourth layer is determined by the source and terminalIpaddress,Tcpand theUdpThe port is determined together. In the hardware four-layer switching product area, there are some well-known products to choose from, such asAlteon,F5and so on, these products are expensive, but value for money, can provide very good performance and very flexible management ability. YahooChina approached2000server uses three or four units.Alteonit's done..

8, software four layer Exchange

Once you know the rationale behind the hardware four-layer switch, The four-layer exchange of software implemented by the OSI model came into being, with the same principle as the solution, but with a slightly worse performance. But to meet a certain amount of pressure or comfortable, some people say that the software implementation is actually more flexible, the ability to handle the full look at your configuration of the familiar ability.

Software four layer exchange we can use linux common lvs to solve, Lvs Linux Virtual server He offers a heart-based line heartbeat Vip configuration and management features that can meet a wide range of application needs, which is essential for distributed systems.

A typical use of load balancing strategy is to build on the basis of software or hardware four-layer switching squid cluster, which is adopted on many large Web sites including search engines, with low cost, high performance and strong extensibility, It is easy to add or subtract nodes to the architecture at any time. Such a structure I am ready to empty a special detail and discuss with you. For large web sites, each of the previously mentioned methods may be used at the same time, I introduced here is relatively simple, the implementation of a lot of detail in the process also requires you to slowly familiar with and experience, and sometimes a very small squid parameter or apache parameter settings, the impact on the system performance will be very large, I hope we can discuss together, To achieve the effect.

use squid as a Web cache server, while Apache provides real Web services behind Squid . Of course, the use of such a framework must ensure that most of the home page is static pages. This requires the programmer's cooperation to convert the page to a static page before the page is fed back to the client. basically see Sina and Sohu for channels and other columns have used the same technology, that is , squid to monitor these IP Port, and the real Web server to listen on another port. There is no difference in the perception of the user, and the way in which the Web server is connected directly to the client, such a way of significantly saving bandwidth and the server. Users will feel faster to access.


Building the Tens Web Access schema

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.