The platform of large dynamic application system is mainly aimed at the low-level system architecture of large traffic and high concurrent web. The operation of large web site needs a reliable, safe, scalable, easy to maintain application system platform as the support to ensure the smooth operation of Web applications.
Large dynamic application system can be divided into several subsystems:
1 Web Front-End System
2) Load Balancing system
3) Database cluster system
4) Caching system
5) Distributed Storage System
6) Distributed Server Management system
7) Code Distribution system
Web Front-End System
Structure Chart:
In order to achieve the different application of server sharing, to avoid single point of failure, centralized management, unified configuration, and so on, not to use the partition server, but to all servers for unified use, each server can provide services for multiple applications, when some application access to increase, By adding server nodes to the performance of the entire server cluster, it also benefits the application. The Web front-end system is based on Apache/lighttpd/eginx and other virtual host platform, which provides the running environment of PHP program. The server is transparent to the developer and requires no developer intervention 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. Software load Balancing system price is low or free, the efficiency is lower than the hardware load balancing system, but for the traffic generally or slightly larger than the site is enough to use, such as LVS, Nginx. Most Web sites are hardware and software load balancing systems.
Database cluster system
Structure Chart:
As the Web front-end uses load-balanced cluster structure to improve the effectiveness and scalability of the service, so the database must also be highly reliable, in order to ensure the high reliability of the entire service system, how to build a highly reliable database system that can provide large-scale concurrent processing?
We can use the scenario shown above:
1 The use of MySQL database, considering the Web application of the database read more write less characteristics, we mainly to read the database has been optimized to provide a dedicated reading database and write database, in the application of read operations and write operations to access different databases respectively.
2 using the MySQL Replication mechanism to quickly copy the main library (write library) database to the library (read library). A main library corresponds to multiple from the library, the main library data is synchronized to from the library in real time.
3 Write the database has more than one, each can provide multiple applications to use together, this can solve the writing library performance bottleneck problems and single point of failure.
4 Read the database has more than one, through load balancing equipment to achieve load balancing, so as to achieve the high performance of reading database, high reliability and high scalability.
5 The database server and application server are separated.
6 use BIGIP to do load balancing from database.
Caching system
The cache is divided into file cache, memory cache, and database cache. The most frequently used and most efficient in large Web applications is the memory cache. The most commonly used memory caching tool is memcached. With the correct caching system, you can achieve the following goals:
1, the use of caching system can improve access efficiency, improve the capacity of the server throughput, improve the user experience.
2, reduce the database and save set server access pressure.
3, memcached server has multiple units to avoid single point of failure, providing high reliability and scalability, improve performance.
Distributed Storage System
Structure Chart:
The storage requirements in the Web system platform have the following two features:
1 storage volume is very large, often reach a single server can not provide the scale, such as photo albums, video applications. Therefore, professional large-scale storage systems are required.
2 each node in the load Balancing cluster may access any data object, and each node can be shared by other nodes, so the data to be manipulated by these nodes is logically only a whole, not separate data resources.
Therefore, high performance distributed storage System is very important for large Web application. (This is a place where you need to add a simple introduction to a distributed storage system.) )
Distributed Server Management System
Structure Chart:
With the increasing traffic of Web site, most of the network services are a load-balanced cluster of external services, with the expansion of the cluster scale, the original based on the server management model has not been able to meet our needs, new requirements must be able to centralized, grouped, batch, automated management of the server , and be able to batch the execution plan task.
There are some excellent software in the Distributed server Management system software, among them the ideal one is cfengine. It can group servers, and different groupings can customize the configuration of system configuration files, scheduled tasks, and so on. 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 over SSL-encrypted connections to the server on a regular basis to obtain the latest configuration files and management commands, scripts, patches, and so on.
With Cfengine This centralized server management tool, we can efficiently implement large-scale server cluster management, the managed server and Cfengine server can be distributed in any location, as long as the network can connect to achieve rapid and automated management.
Code Publishing System
Structure Chart:
With the increase of web site traffic, most of the network services are to provide services in the form of load-balanced cluster, with the expansion of cluster scale, we also need a program code publishing system to meet the batch distribution and update of program code in the cluster environment.
This release system will help us achieve the following goals:
1 The production environment of the server to provide services to the virtual host, no need for developers to intervene in maintenance and direct operation, the provision of a publishing system can be implemented without landing server can distribute programs to the target server.
2 We want to achieve internal development, internal testing, production environment testing, production environment release of the 4 development stages of management, the release system can intervene in various stages of code release.
3 We need to implement source code control and versioning, SVN can achieve this requirement.
This allows you to use a common tool, rsync, to implement synchronous distribution of code between server clusters by developing the appropriate scripting tools.