redis study notes -02: Why NoSQL database

A first generation: stand-alone version of MySQL

1, static pages, dynamic interactive few types of websites.

2. Architecture: APP ----> DAL ----> MySQL Instance

3, the data storage bottlenecks:

(1) the total amount of data size exceeds the memory of the machine

Index data amount and (2) the data size exceeds the memory of the machine

(3) the amount of access (read and write mix) more than one instance of the affordable range

 

Two, Memcached (cache) + MySQL + Vertical Split

1, with the rise in traffic, the use of MySQL architecture site experiences performance issues. not only concerned with web applications achieve functional, but also the pursuit of performance, so use caching techniques to ease the pressure on the database. If you frequently queried are some of the commonly used data, you can put the data in the cache, reducing the pressure on the database being accessed.

2、架构:APP---->DAL---->Cache---->(MySQL Instance1,MySQL Instance2,MySQL Instance3 ...)

3, the data fit a MySQL database, the data be shared by a plurality of instances MySQL.

 

Three, MySQL separated from the master copy, read and write

1, in order to improve the disaster recovery capability of the database, inserting a main library data will add corresponding data from the library.

2, with the pressure on the database writes increase, Memcahed can only ease the pressure on the database to read, read and write in a centralized database to make database overwhelmed.

3, then a master-slave read-write copy technology to achieve separation, such as multiple MySQL database, the main database (master) for writing a, (Slave) for reading a plurality of, i.e., master-slave mode from the library.

4. Architecture: APP ----> DAL ----> Cache ----> MySQL Master ----> (Slave1 MySQL, MySQL Slave2 ...).

 

Fourth, the sub-sub-table level split + + mysql database cluster

1, in Memcahed cache, MySQL master-slave replication and basic reading and writing on the separation, then write the master pressure MySQL database bottlenecks.

2, so popular library using the points table points to relieve pressure and volume expansion problems writing data growth.

3, sub-bank is defined as: low coupling as far as possible, the height of business-related, frequent, active data in a database, a low correlation in another library. Sub-table refers to the mass of data is written separately.

4, a plurality of master MySQL from MySQL-Cluster Cluster configuration. Architecture: APP ----> DAL ----> Cache ----> ((M1 MySQL, MySQL S11, S21 MySQL ...), (M 2 MySQL, MySQL S21, S22 MySQL ...). ..).

 

Five, NoSQL database (Not Only SQL)

1, NoSQL database refers to non-relational databases, NoSQL database is generated in order to solve large-scale data collection of multiple data types of challenges brought about, especially in big data application problems, including large-scale data storage.

2, the data in the database NoSQL unnecessary when a fixed storage mode, remove the relationship, no extra operation can be extended laterally.

3, MySQL and other relational databases in dealing with web2.0 sites, particularly large scale and high concurrent web2.0 pure dynamic site appeared to be inadequate, contributed to the development of NoSQL databases.

 

 

Guess you like

Origin www.cnblogs.com/Luv-GEM/p/11502897.html