This article from: http://tech.it168.com/a2012/0110/1300/000001300144_all.shtml
"IT168 technology" with the widespread popularization of Internet applications, the storage and access of massive data has become the bottleneck of system design. For a large-scale Internet application, every day millions even hundreds of millions of PV undoubtedly caused a considerable load on the database. The stability and scalability of the system caused great problems.
First, load balancing technology
The load Balancing cluster is composed of a set of independent computer systems, which are connected by a regular network or a private network, the routers converge together, each node cooperates, the common load, and the equilibrium pressure, for the client, the whole cluster can be regarded as a stand-alone server with super high performance.
1. Principle of realization
To realize the load balancing technology of the database, we must first have a control side that can control the connection database. Here, it truncates the direct connection between the database and the program, which is accessed by all programs, and then by the middle tier to access the database. This allows us to control access to a particular database, and then we can take an effective equalization strategy based on the current load of the database to adjust each connection to which database.
2. Realize multi-database data synchronization
For load balancing, the most important thing is that all server data is synchronized in real time. This is necessary for a cluster, because, if the number is not real-time, out-of-sync, then the user from one server read the data, it is different from the other server read the data, this is not allowed. Therefore, data synchronization of the database must be implemented. In this way, the query can have multiple resources, to achieve a balanced. A more common approach is Moebius for SQL Server clusters, where the Moebius for SQL Server cluster takes the approach of hosting the core program in a database of each machine, called the Moebius for SQL Server middleware, The primary role is to monitor changes in the data in the database and synchronize the changed data to other databases. After the data synchronization is completed, the client will get a response, the synchronization process is completed concurrently, so synchronization to multiple databases and synchronization to a database is basically the same time, and the synchronization process is done in the context of the transaction, to ensure that the data at any time of multiple data consistency. Because of the innovation of Moebius middleware hosting in database, the middleware can not only know the change of data, but also know the SQL statement which causes the data change, and adopt different data synchronization strategy according to the type of SQL statement to ensure the minimization of the data synchronization cost.
Data is very small, data content is not large, the data is synchronized directly
The number of data bars is small, but contains large data types, such as text, binary data, and so on, the data is compressed and then synchronized, thereby reducing the network bandwidth consumption and transmission time.
The number of data bars is so large that the middleware gets the SQL statements that make the data change, then parses the SQL statements, analyzes their execution plan and execution costs, and chooses whether to synchronize the data or synchronize the SQL statements to other databases. This situation is useful when adjusting the table structure or changing data in bulk.
3. Advantages and Disadvantages
(1) Strong extensibility: When the system to higher database processing speed, as long as simply increase the database server can be extended.
(2) Maintainability: When a node fails, the system will automatically detect the failure and transfer the application of the fault node to ensure the continuous work of the database.
(3) Security: Because the data will be synchronized on multiple servers, you can achieve the redundancy of the data set, through multiple copies of data to ensure security. In addition, it successfully put the database into the intranet to better protect the security of the database.
(4) Ease of use: completely transparent to the application, the cluster exposes an IP
(1) The load cannot be allocated according to the processing capacity of the Web server.
(2) The Load Balancer (control side) failure can cause the entire database system to be paralyzed.
SQL Server Database Large Application Solution Summary