combing1のブログ

combing1のブログ

ブログの説明を入力します。

Amebaでブログを始めよう!
With the wide spread of Internet applications, to store and access Air Max 597806-400 Nike LeBron X EXT QS Denim-Pink Outlet 2011 Womens Purple Black Grey huge amounts of data has become the bottleneck of the system design. For a large-scale Internet applications, one million per day or billions of PV database undoubtedly cause a very high load. For the stability and scalability of the system caused great problems. First, load balancing technology load balancing cluster is a group of independent computer system configuration, connected via a conventional network or private network, link together by routers, each node of mutual cooperation and common load, balanced Air Jordan Outlet pressure, to clients , the entire cluster can be viewed as a stand-alone server that has ultra-high performance. 1, the realization of the principle of the database load balancing technology, the first to have a control terminal connected to control the database. Here, it cut off the direct connection to the database and procedures by all programs to access the intermediate layer, and then by the middle tier to access the database. In this way, we can control access to a specific database, and then you can also take effective load balancing strategy based on the current database, which is adjusted each time you connect to the database. 2, multi-database data synchronization for load balancing, the most important is the real-time data from all servers are synchronized. This is necessary for a cluster, because, if the number is not real-time data, sync, then the user reads the data from a server, it is different from the data read out from another server, which is not allowed. So it must Air Max 2011 Womens Purple Grey implement database data synchronization. Thus, at the time of the query can have multiple resources to achieve equilibrium. More commonly used method is to Moebius for SQL Server cluster, Moebius for SQL Server cluster approach adopted core program resides on each machine in the database, the core program is called Moebius for SQL Server middleware, the main role is to monitor the database within changes in the data and changing data synchronized to other databases. After the completion of the data synchronization client will get a response, the synchronization process is complicated by complete, so synchronized to multiple databases and synchronized to Nike Dunk Heels a database of time substantially equal; additional synchronization process is completed in a transaction environment, ensuring more copies of data at any time data consistency. Because Moebius middleware host innovation in the database, so the middleware data changes not only to know, but to know SQL statement causes data changes, SQL statements to take a different type of intelligent policy based data synchronization to ensure data synchronization costs minimized. The number of small data, the data content is not large, the number of direct synchronization data are scarce, but it contains a large data types such as text, binary data, the first data is compressed and then synchronize, reducing network bandwidth occupation and transmission time used. Lot number data, when the data changes caused middleware will get the SQL statement, then the SQL statement analysis, analysis of its implementation plan and implementation costs, and select a synchronous data or synchronize SQL statements to the other database. In this case the application to adjust the structure of the table or bulk changes when data is very useful. 3, the advantages and disadvantages (1) scalability: when the system database processing to a higher speed, simply increase the database server can be expanded. (2) Maintainability: When a node fails, the system will automatically detect the failure and the failed node metastasis application to ensure continuous operation of the database. (3) Safety: Because data on multiple servers synchronized redundant data sets can be achieved through multiple copies of data to Nike Lebron 10(X) ensure security. In addition, it has successfully put the database into the network, to better protect the security of the database. (4) Ease of 597806-400 Nike LeBron X EXT QS Denim-Pink Outlet use: it is completely transparent to the application, the cluster is an exposed IP (1) can not be in accordance with the processing capabilities of the Web server to distribute the load. (2) Load Balancer (control side) malfunction, can cause paralysis of the entire database system. Second, write a separate database, realization of the principle: read and write separation simply is to separate read and write operations on the database corresponding to a different database server, so the database can effectively reduce the pressure, but also can reduce the io pressure. Master database provides a write operation, a read operation from the database offers, in fact, many systems, mainly read operations. When the primary database Nike Air Max is written, the data from the database to be synchronized, so as to effectively ensure database integrity. (Ebay literacy ratio is 260: 1, ebay read and write separation) (Microsoft database distribution) 2. Method: In MS Sql server can be used to define the ways publishing database replication, read and write separation, copying is a set of data copied from one data source to multiple data sources of technology, is an effective way to publish data to a plurality of storage sites. Using replication technology, users can copy data to publish to multiple servers. Replication technology ensures that the data in different locations automatically synchronized to ensure data consistency. SQL SERVER replication technology There are three types, namely: snapshot replication, transactional replication, merge replication. SQL SERVER mainly publications, subscription way to handle replication. Server source server where the data is published, is responsible for published data. Copies of all the changes of the publishing server to publish the data is copied to the distribution server, the distribution server includes a distributed database, data can be received all the changes and save the changes, and then distributed to subscribers of these changes. Real-time differential, advantages and disadvantages of (1) data: data is not real-time synchronization to the server from reading, when the data is written to the primary server, after the next synchronization can be queried. (2) the difference between the amount of data synchronization efficiency: insert and update the index because, Air Max 2011 Womens Purple Grey disk IO and so on, the performance becomes poor when excessive single-table data. (3) simultaneous connection of multiple (at least two) database: connect at least two data in the database, the actual read and write operations are performed in the program code can be confusing (4) read with high performance and high reliability Scalable: read-only server, because there is no write operation will greatly reduce the disk IO and other performance issues, greatly improving efficiency; read-only server load balancing can be used, the primary database publishing to achieve a read operation on multiple read-only server scalability ʱ?? Third, database sharding (distributed) by certain conditions, the data will be stored in the same database stored Air Max 2011 Womens Grey Green on multiple databases dispersed to achieve distributed storage, access to specific database through routing rule, so that each The visit would not face a single server, but rather N servers, Mens Nike Free Run 3 Shoes Black 3 which can reduce the load pressure single machine. Vertical (portrait) Split: Split is defined as functional modules, such as the library is divided into orders, merchandise library, user library ... different table structure in this way between multiple databases. Level (horizontal) split: will be saved to a different block of the same data in a database table, the table structure identical to those in the database. (Longitudinal split) (horizontal split) 1 principle: using a vertical split, mainly depends on the type of application is appropriate to split this way, such as the system can be divided, order systems, merchandise management system, user management systems business system is relatively clear, and the vertical split can play a good dispersion database pressure. Service module is not clear, coupling (Table relevance) relatively high degree of system is not suitable to use this split way. But the vertical split mode does not completely solve the problem of all pressure, for example, a 5000w Orders table, the operation pressure of the order bank still large, as we need to increase the (insert) a new data in this table, insert Completion , the database will be re-established for this table index, 5000w line data indexing overhead can not be ignored, in turn, if we have this table is divided into 100 table it, New Nike Free 5.0 V4 Grey Blue Running Shoes from table_001 until table_100,5000w rows on average, Each sub-table inside only 500,000 rows of data, this time to a table we only 50w insert rows of data in the index after data showed the number of class time will be decreased greatly improve the operational efficiency of DB time, improve Concurrent amount of DB, which is transversely split 2 split, implementation method: vertical split, split mode relatively simple to implement, according to the table name to access different databases on it. Many transverse split rules here summarize previous points, (1) the order split: If you can press Nike Free 5.0 V2 Women a few days ago by year Caifen orders placed in 2003 in the db1 in 2004 of db2, and so New Nike Free Run 3 Shoes Silver 3 on. Of course, the standard can be split by the primary key. Advantages: partial migration Disadvantages: uneven distribution of data, may 2003 orders have 100W, 2008 years have 500W. (2) hash modulo points: The user_id perform hash (or if user_id is numeric, then the direct use user_id value can be), and then use a specific number, such as the application requires a database cut into 4 database, We will use this number to 4 user_id the hash value modulo operation, which is user_id% 4, so each operation, there are four possibilities: the result is 1 when the corresponding DB1; the result is, when 2 corresponds DB2; Results 3, when the corresponding DB3; the result is 0 when the corresponding DB4, such an action would very evenly allocate data to four DB. Advantages: Data distribution disadvantage: data migration when trouble; you can not share data according to machine performance. (3) is stored in the authentication library database configuration it is to create a DB, the DB saved separately user_id mapping to the DB every time they have to access the database query once the database to get specific information DB, and then be carried out We need to query operation. Advantages: flexibility, one relationship Cons: have more than one query before the 2015 Nike Free 5.0 query each time, will cause some performance loss.large database application solutions summary