A brief talk on large web system architecture, Web system Architecture _php Tutorial

Source: Internet
Author: User

On the architecture of large web system and the architecture of web system


Dynamic application, relative to the static content of the website, refers to the Web application software developed in the server-side language such as C + +, PHP, Java, Perl,. NET, etc., such as forums, web albums, friends, blogs and other common applications. The dynamic application system is usually inseparable from the database system, the cache system and the distributed storage System.

The large-scale dynamic application system platform is mainly aimed at the low-level system architecture established by high-traffic and highly concurrent websites. The operation of large-scale web site requires a reliable, secure, extensible, easy-to-maintain application platform as a support to ensure the smooth operation of the website application.

  Large dynamic application system can be divided into several subsystems:

1) Web Front end system

2) Load Balancing system

3) Database cluster system

4) Cache System

5) Distributed Storage System

6) Distributed Server Management system

7) Code Distribution system

  Web Front End system

Structure diagram:

In order to achieve the different applications of server sharing, avoid single point of failure, centralized management, unified configuration and other purposes, do not divide the server with the application, but all the servers are unified use, each server can provide services to multiple applications, when some of the application traffic increases, By increasing the server node to achieve the overall server cluster performance improvement, but also to the benefit of his application. The Web front-end system is based on the virtual host platform of Apache/lighttpd/eginx, which provides the PHP program running environment. The server is transparent to the developer and does not require the developer to intervene in server management

Load Balancing System

Load balancing system is divided into two kinds: hardware and software. Hardware load balancing efficiency is high, but the price is expensive, such as F5. The software load balancer system is cheap or free, and the efficiency is lower than the hardware load balancer system, but it is enough for traffic general or slightly bigger website, such as LVs, Nginx. Most websites are both hardware and software load balancing systems.

DB Cluster system

Structure diagram:

Because the Web front-end uses the load-balanced cluster structure to improve the efficiency and expansibility of the service, the database must also be high reliable, in order to guarantee the high reliability of the whole service system, how to build a high reliable database system that can provide large-scale concurrent processing?

We can take the scenario as shown:

1) using MySQL database, considering the characteristics of Web application database read and write less, we mainly optimize the read database, provide a dedicated read database and write database, in the application to implement read operations and write operations to access different databases.

2) Use the MySQL Replication mechanism to quickly copy the database of the main library (write library) to the Slave library (read library). One main library corresponds to multiple slave libraries, and the master library data is synchronized to the slave library in real time. Dumpling Machine Www.yjlmj.com Finishing Release

3) Write database has more than one, each can provide multiple applications for common use, this can solve the write library performance bottleneck problems and single point of failure.

4) Read database has more than one, through load balancing equipment to achieve load balancing, so as to achieve high performance, high reliability and high scalability of the read database.

5) The database server is detached from the application server.

6) Load balancing using BIGIP from the database.

Cache system

The cache is divided into file caches, memory caches, and database caches. The most used and most efficient in large Web applications is the memory cache. The most commonly used memory caching tool is memcached. Using the correct caching system can achieve the following goals:

1, the use of caching system can improve access efficiency, improve server throughput, improve the user experience.

2, reduce the database and storage set server access pressure.

3, memcached server has more than one, to avoid single point of failure, to provide high reliability and scalability, improve performance.

Distributed Storage Systems

Structure diagram:

  The storage requirements in the Web system platform have the following two features:

1) storage is very large, often to a single server can not provide the scale, such as photo albums, video and other applications. Therefore, professional large-scale storage systems are required.

2) Every node in the Load Balancer cluster can access any data object, and the processing of the data by each node can be shared by other nodes, so the data to be manipulated by these nodes logically can only be a whole, not their own independent data resources.

Therefore, the high-performance distributed storage System is very important for the large-scale website application. (This place needs to include a brief introduction to a distributed storage system.) )

Distributed Server Management System

Structure diagram:

With the increase of website access traffic, most of the network services are to provide services in a load-balanced cluster, with the expansion of cluster scale, the original single-machine-based server management model has not been able to meet our needs, the new requirements must be able to centralized, grouped, batch, automated server Management To perform scheduled tasks in a batch format.

In the distributed server Management system software, there are some excellent software, one of the more ideal is cfengine. It can group servers, different groupings can be customized system configuration files, scheduled tasks and other configurations. It is based on the C/s structure, all server configuration and management scripts are stored on the Cfengine server, while the managed server runs the Cfengine Client program, Cfengine Client sends requests to the server on a regular basis through SSL-encrypted connections to obtain the latest configuration files and management commands, scripts , patches, and other tasks.

With Cfengine, a centralized server management tool, we can efficiently implement large-scale server cluster management, the Management Server and Cfengine server can be distributed anywhere, as long as the network can be connected to achieve rapid and automated management.

Code Publishing System

Structure diagram:

With the increase of website access traffic, most of the network services are distributed in a load-balanced cluster to provide services, with the expansion of cluster size, in order to meet the cluster environment in the batch distribution and update of the program code, we also need a program code Publishing System.

This release system can help us achieve the following goals:

1) The server of the production environment provides the service by the virtual host, does not need the development personnel to intervene the maintenance and the direct operation, provides the release system to be possible to be able to distribute the program to the target server without needing the login server.

2) We want to achieve internal development, internal testing, production environment testing, production environment release of the 4 development stages of management, release system can be involved in the various stages of code release.

3) We need to implement source code control and versioning, and SVN can implement that requirement.

This can be used in the common tool rsync, through the development of appropriate scripting tools to achieve inter-server cluster code synchronization distribution.

http://www.bkjia.com/PHPjc/1021467.html www.bkjia.com true http://www.bkjia.com/PHPjc/1021467.html techarticle talking about the large-scale web system architecture, the dynamic application of Web system architecture is relative to the static content of the website, it refers to the network application developed in the server-side language such as C + +, PHP, Java, Perl,. NET, etc.

  • Related 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.