Sinsing website Architect's notes first article

Source: Internet
Author: User

said the site's hard structure, first of all, is the choice of the room, then the size of the broadband, then the server division, the server is usually divided into Image server, page server, database server, Application Server, day to server and so on. for the soft architecture of the Web site, there can be a framework choice, and then a logical layering.

For the site optimization, the first thing to consider is the HTML static, for a large site, the use of a set of efficient CMS is very important, the second consideration is the image server separation, because the picture server is the most consumption of resources, the third is to consider the database cluster and library table hash, the fourth one is the cache, The first is the software layer cache, such as Apache's cache module and squid cache, can improve Apache's response to access, and then the programming language can also use their own cache module. The fifth one is the mirror, mirroring technology can solve different network access providers and regions brought by the user access to the difference, the 6th is load balancing, load balancing is a large web site to solve high-load, high concurrent requests the ultimate method.

Linux server can provide mail, Web, file cache, database and other services, and the cost of Linux server is also relatively low, because it does not need to buy a dedicated hardware device, it can be run on a normal PC. For Linux clusters, there are usually three categories: the first is a high-availability cluster, which is designed to provide services while a node is clapping, and the second is a load-balanced cluster, which is designed to balance the load capacity of each node, and is designed to handle large-volume Web services. Load-balanced clusters often have high-availability features. The third category is Supercomputing cluster, according to the degree of Computing Association, can be divided into task slices and parallel computing methods.

in general, high-availability clusters do not require load balancing, which is designed to improve system reliability without increasing load capacity, and high-availability clusters can run multiple services, such as Node A provides MySQL services, and Node B provides Oracle services. load Balancing can be used to provide relatively static data services, such as HTTP services, because each node of a load-balanced cluster does not typically have a common storage medium, and our data is often copied to multiple parts and stored on each node.

Many hardware manufacturers have their own dedicated load-balancing devices, and these load-balancing devices in the form of a lot of that, for example, some of the load-balancing function in the switching device, that is, between the server and Internt, and some manufacturers to integrate these functions on the computer, One can be connected to the front-end switch, and the other is connected to the Internet via a router or other device. and load balancer devices generally support the out-of-path return mode, that is, the traffic allocator can be bypassed, for those who require a large number of users to provide faster response.

Load balancing devices can be divided into both local and remote, and the local load balancer can balance the load between all servers and applications in the server cluster, handing requests to the least-loaded server for processing, to improve server performance. And these load-balancing devices can also be recorded to understand the distribution of traffic.

For the remote load balancing technology, the enterprise with multiple website addresses is designed to route traffic to the most convenient site based on a single URL address, thus enabling a network-wide load balancer. Of course, the workload of this load balancing system is very large, he needs to collect the state information of multiple sites in the background, such as the response time of the server, traffic, the state of the local system, so that the device can immediately determine the status of each data center, and to guide the access to the best site.

The first software load balancing technology is done through DNS polling, in the DNS configuration of multiple A records, the client to query the domain name will be one of the corresponding address of a record, so that different customers access to different servers, so as to achieve load balancing purposes. However, it does not differentiate between servers, and he cannot reflect the current server's running state.

In addition to the DNS polling, another effective way is the proxy server, send the request to the internal server, he can increase the speed of the static Web page access, or the request can be evenly forwarded to multiple servers, so as to achieve load balancing purposes. However, this agent is not an ordinary agent, he is the agent of multiple users to access the internal server, so called reverse proxy. The standard proxy method is for clients to use proxies to access external servers.

For each request, the proxy server must maintain two connections, one for the external connection, and one for the internal connection, so the load on the proxy server is significant for high number of connections. Reverse proxies should use optimizations that request the most idle internal servers each time they are accessed, and the proxy server may also be called a service bottleneck.

When a site hits thousands of times per second, TCP connections, HTTP header information, and process latency are important, and in HTTP requests and headers I have a lot of information that is useful for load balancing.

Sinsing website Architect's notes first article

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.