In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The bottleneck of Relational Database
1. High concurrent read and write requirements
The concurrency of users of the website is very high, often reaching tens of thousands of read and write requests per second. For traditional relational databases, the hard disk Istroke O is a big bottleneck.
2. Efficient reading and writing of massive data
The amount of data generated by the website every day is huge, and for relational databases, it is very inefficient to query in a table containing huge amounts of data.
3. High scalability and availability
In the web-based structure, the database is the most difficult to scale out. When the number of users and visits of an application system is increasing day by day, the database has no way to expand the performance and load capacity as simply as web server and app server by adding more hardware and service nodes. For many websites that need to provide round-the-clock service, it is very painful to upgrade and expand the database system, which often requires downtime maintenance and data migration.
4. Transaction consistency
Relational databases have a lot of overhead in maintaining the consistency of things, but now many web2.0 systems do not have high consistency in reading and writing things.
5. Real-time reading and writing
For a relational database, it is certainly possible to read a piece of data immediately after inserting it, but for many web applications, it does not require such high real-time performance. For example, after sending a message, it is entirely acceptable to see the dynamic after a few seconds or even more than ten seconds.
6. Complex SQL, especially multi-table association query
Any web system with a large amount of data is very taboo to query the association of multiple large tables, as well as complex data analysis types of complex SQL report queries, especially the SNS type of websites, from the point of view of demand and product class, to avoid this situation. Often it is only the primary key query of a single table and the simple conditional paging query of a single table, so the function of SQL is greatly weakened.
In relational databases, the main reasons for poor performance are multi-table associated queries and complex SQL report queries with complex data analysis types. In order to ensure the ACID characteristics of the database, we must try our best to design according to its required paradigm. The tables in the relational database are all stored in a formatted data structure. The composition of each tuple field is the same, even if not every tuple needs all fields, but the database assigns all fields to each tuple. This structure can facilitate operations such as linking between slogan tables, but from another point of view, it is also a factor in the performance bottleneck of relational databases.
Non-relational database
1. The demand for high concurrent read and write of database.
Web2.0 website needs to generate dynamic pages and provide dynamic information in real time according to users' personalized information, so it is basically impossible to use dynamic page static technology, so the concurrent load of database is very high, often reaching tens of thousands of read and write requests per second. Relational database can barely cope with tens of thousands of SQL queries, but the hard disk IO can no longer handle tens of thousands of SQL write data requests. In fact, for ordinary BBS sites, there is often a demand for high concurrent write requests, such as real-time statistics of online user status, recording the number of clicks on popular posts, voting count and so on, so this is a very common demand.
2. The need for efficient storage and access of massive data
SNS sites like Facebook,twitter,Friendfeed generate a large amount of user dynamics every day. Take Friendfeed as an example, there are 250 million user dynamics in a month. For relational databases, it is extremely inefficient and even unbearable to query SQL in a table of 250 million records. For example, the user login system of large web websites, such as Tencent, Shanda, often has hundreds of millions of accounts, and the relational database is also very difficult to deal with.
3. Requirements for high scalability and high availability of the database
In the web-based architecture, the database is the most difficult to scale out. When the number of users and visitors of an application system is increasing day by day, your database has no way to expand the performance and load capacity as easily as web server and app server by adding more hardware and service nodes. For many websites that need to provide 24-hour uninterrupted service, it is very painful to upgrade and expand the database system, which often requires downtime maintenance and data migration. why can't the database be expanded by constantly adding server nodes?
In the face of the "three high" requirements mentioned above, relational databases encounter insurmountable obstacles, but for web2.0 sites, many of the main features of relational databases are often useless, such as:
1. Database transaction consistency requirements
Many web real-time systems do not require strict database transactions, low requirements for read consistency, and low requirements for write consistency in some cases. Therefore, database transaction management has become a heavy burden under the high load of database.
two。 The requirements of realism and real-time reading of database
For relational databases, it is certain that you can read a piece of data immediately after inserting it, but for many web applications, it does not require such high real-time performance. For example, after I (JavaEye's robbin) sent a message, it took a few seconds or even more than ten seconds for my subscribers to see that this dynamic was completely acceptable.
3. Requirements for complex SQL queries, especially multi-table association queries
Any web system with a large amount of data is very taboo to query the association of multiple large tables, as well as the complex SQL report query of complex data analysis types, especially the website of SNS type, which avoids this situation from the point of view of requirements and product design. Often it is only the primary key query of single table and the simple conditional paging query of single table, so the function of SQL has been greatly weakened.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.