Cloud database knowledge learning - overview

1. Cloud computing is the basis for the rise of cloud databases

        Cloud computing is the product of the development and integration of computer and network technologies such as distributed computing, parallel computing, utility computing, network storage, virtualization, and load balancing. Cloud computing is composed of a series of resources that can be dynamically upgraded and virtualized. Users do not need to master cloud computing technology and can access these resources through the network.

        Cloud computing mainly includes three types, namely IaaS (Infrastructure as a Service), PaaS (Platform as a Service) and SaaS (Software as a Service). Taking SaaS as an example, it has greatly changed the way users use software. Users no longer need to purchase software to install on their local computers, but can use various software through the network. SaaS vendors uniformly deploy application software on their own servers, and users can purchase, use, and pay on-demand online. Salesforce, founded in 1999, is a pioneer of SaaS vendors, providing SaaS cloud services and proposing the slogan "End Software". Following the company's lead, other SaaS vendors have sprung up.

        Compared with traditional software usage, cloud computing has obvious advantages, as shown in Table 6-1.

2. The concept of cloud database

        Cloud database is a database deployed and virtualized in a cloud computing environment. Cloud database is an emerging method of sharing infrastructure developed under the background of cloud computing. It greatly enhances the storage capacity of the database, eliminates the duplication of configuration of personnel, hardware, and software, and makes software and hardware upgrades easy. It is easier to implement and also virtualizes many back-end functions. Cloud databases have the characteristics of high scalability, high availability, multi-tenancy and effective distribution of resources.

        In cloud database, all database functions are provided in the cloud, and clients can use the services provided by cloud database remotely through the network, as shown in Figure 6-1. The client does not need to know the underlying details of the cloud database. All underlying hardware has been virtualized and is transparent to the client. It is just like using a database running on a single server. It is very convenient and easy at the same time. Theoretically nearly unlimited storage and processing power can be obtained.

        It should be pointed out that some people think that databases belong to application infrastructure (i.e., middleware), so cloud databases are included in the category of PaaS. Others think that the database itself is also a kind of application software, so cloud databases are included in SaaS. Regarding this issue, this article classifies cloud databases as SaaS, but it also believes that whether cloud databases should be classified as PaaS or SaaS is not the most important. In fact, the boundaries between the three levels of cloud computing IaaS, PaaS, and SaaS are sometimes not very clear. For cloud databases, the most important aspect is that it allows users to obtain cloud database functions through the network in the form of services.

3. Characteristics of cloud database

3.1. Dynamically scalable

        In theory, cloud databases are infinitely scalable and can meet increasing data storage needs. Cloud databases can demonstrate great resilience in the face of changing conditions. For example, for an e-commerce company engaged in product retail, there will be seasonal or sudden changes in product demand, or for an online community site like Animoto, it may experience an exponential user growth stage. In this case, you can Allocating additional database storage resources to handle increased demand takes only a few minutes. Once the demand has passed, these resources can be released immediately.

3.2. High availability

        There is no single point of failure. If a node fails, the remaining nodes will take over the outstanding transactions. Moreover, in cloud databases, data is usually stored redundantly and geographically distributed. Large cloud computing providers such as Google, Amazon, and IBM have data centers distributed around the world and can provide a high level of fault tolerance by replicating data across different geographical intervals. For example, Amazon SimpleDB replicates data in different regions, so even if a cloud facility fails in a region, the data is still available.

3.3. Lower cost of use

        Usually in the form of multi-tenancy, services are provided to multiple users at the same time. This form of shared resources can save costs for users, and users adopt a "pay-as-you-go" approach to use cloud computing environments. Various software and hardware resources will not cause unnecessary waste of resources. In addition, the underlying storage of cloud databases usually uses a large number of cheap commercial servers, which also greatly reduces user expenses. Official information released by Tencent Cloud Database shows that when achieving similar database performance, if you invest in and build your own MySQL, the unit price is 50.6 yuan per day per unit, and 2 units are needed to achieve dual-machine disaster recovery, which is 101.2 yuan/day. , the average storage cost is 0.25 yuan per GB per day, and the average QPS (Query Per Second) that can be obtained for 1 yuan is 24 times/second; and if Tencent Cloud database products are used, enterprises do not need to invest in any initial construction costs, and the cost is only 72 Yuan/day, the average storage cost is 0.18 Yuan per GB per day, and the average QPS obtained for 1 Yuan per day is 83 times/second. Compared with self-built, the average QPS obtained for 1 Yuan of cloud database is increased to 346% of the original, with extremely high value for money.

3.4. Ease of use

        Users of cloud databases do not have control over the machine running the original database, nor do they need to know where it is located. Users only need a valid connection string (URL) to start using the cloud database, just like using a local database. Many cloud database products based on MySQL (such as Tencent Cloud Database, Alibaba Cloud RDS, etc.) are fully compatible with the MySQL protocol. Users can access instances through clients or APIs based on the MySQL protocol. Users can seamlessly migrate the original MySQL application to the cloud storage platform without any code modification.

3.5. high performance

        It adopts a large-scale distributed storage service cluster to support massive data access, automatic redundant backup of multiple computer rooms, and automatic separation of reading and writing.

3.6. maintenance free

        Users do not need to pay attention to various risks such as the stability of back-end machines and databases, network problems, computer room disasters, and single database pressure. Cloud database service providers provide 7×24h professional services. Expansion and migration are transparent to users and do not affect services. And can provide all-round, all-weather three-dimensional monitoring, users do not need to deal with database failures in the middle of the night.

3.7. Safety

        Provide data isolation, data of different applications will exist in different databases without affecting each other; provide security checks, can detect and deny malicious attacks in time; provide multi-point backup of data to ensure that no data loss occurs.

        Taking Tencent Cloud Database as an example, developers can quickly apply for cloud server instance resources in Tencent Cloud and directly access the MySQL instance through IP/PORT. There is no need to install a MySQL instance. Original SQL applications can be migrated to the Tencent Cloud platform with one click. This greatly saves labor costs; at the same time, the cloud database is fully compatible with the MySQL protocol, and instances can be easily accessed through clients or APIs based on the MySQL protocol. In addition, it also uses a large-scale distributed storage service cluster to support massive data access, 7×24h professional storage services, and can provide MySQL cluster services with up to 99.99% service availability, and data reliability exceeds 99.999%. The comparison between Tencent Cloud database and self-built database is shown in Table 6-2.

4. Cloud database is an ideal choice for personalized data storage needs

        In the era of big data, every enterprise continues to generate large amounts of data almost every day. Different types of enterprises have different storage requirements, and cloud databases can well meet the individual storage needs of different enterprises.

        First of all, cloud databases can meet the massive data storage needs of large enterprises. Cloud databases have broad application prospects in the current data explosion era of big data. According to IDC's research report, enterprises' storage demand for structured data will increase by about 20% every year, while storage demand for unstructured data will increase by about 60% every year. Traditional relational databases are difficult to scale horizontally and cannot store such massive data at all. Therefore, a cloud database with high scalability becomes a good choice for enterprise mass data storage management.

        Secondly, cloud databases can meet the low-cost data storage needs of small and medium-sized enterprises. Small and medium-sized enterprises have relatively limited investment in IT infrastructure and are very eager to obtain database services from third parties conveniently, quickly and cheaply. The cloud database adopts a multi-tenant approach to provide services to multiple users at the same time, which reduces the usage cost of a single user. Moreover, users usually pay on demand when using cloud database services, without wasting resources and causing additional expenses. Therefore, the cost of using cloud databases is very low. For small and medium-sized enterprises, it can greatly lower the threshold of enterprise informatization, allowing enterprises to obtain high-quality professional-level database services while paying lower costs, thereby effectively improving the level of enterprise informatization.

        In addition, cloud databases can meet the dynamically changing data storage needs of enterprises. The amount of data that enterprises need to store at different times is constantly changing, sometimes increasing and sometimes decreasing. In the case of small-scale applications, changes in system load can be handled by the idle redundant resources of the system. However, in the case of large-scale applications, traditional relational databases are not only unable to meet application needs due to their poor scalability, but also Bringing high storage costs and management overhead to enterprises. The good scalability of cloud databases allows enterprises to immediately improve database capabilities when demand increases, and immediately release excess database capabilities when demand decreases, thus better meeting the dynamic data storage needs of enterprises.

        Of course, this does not mean that cloud databases can meet different types of personalized storage needs, but it means that enterprises must store data in cloud databases. Whether to choose a self-built database or a cloud database depends on the specific needs of the enterprise itself. For some large enterprises, they usually use self-built databases. On the one hand, the enterprises have relatively strong financial resources and have internal IT teams responsible for database maintenance. On the other hand, data is the core asset of modern enterprises and involves many high-level commercial secrets. Due to data security considerations, companies are unwilling to store internal data in public cloud databases. Although cloud database providers will always emphasize data security, this still cannot dispel enterprises' concerns. For some small and medium-sized enterprises with limited financial resources and limited IT budgets, it is impossible to invest a lot of money in building and maintaining databases. Enterprise data is not particularly sensitive. Therefore, cloud databases, a database service with zero investment in the early stage and no maintenance in the later stage, can be very good. meet their needs.

5. The relationship between cloud database and other databases

        Relational databases use a relational data model, and NoSQL databases use a non-relational data model. Both are different database technologies. From the perspective of data model, cloud database is not a new database technology, but only provides database functions in the form of services. The cloud database does not have its own data model. The data model used by the cloud database can be the relational model used by relational databases (such as Microsoft's SQL Azure cloud database and Alibaba Cloud RDS all use relational models), or it can be NoSQL The non-relational model used by the database (for example, Amazon Dynamo cloud database uses "key/value" storage). The same company may also provide multiple cloud database services using different data models. For example, Baidu Cloud Database provides three types of database services, namely distributed relational database service (based on the relational database MySQL) and distributed non-relational database service (based on the relational database MySQL). Based on document database MongoDB), key/value non-relational database service (based on key/value database Redis). In fact, when many companies develop cloud databases, their back-end databases directly use various existing relational databases or NoSQL database products. For example, Tencent Cloud Database uses MySQL as the back-end database, and Microsoft's SQL Azure cloud database uses SQL Server as the back-end database. Judging from the overall application situation of the market, since NoSQL applications have higher requirements for developers, and MySQL has mature middleware, operation and maintenance tools, and has formed a benign ecosystem, etc., so from the current stage, the cloud database The back-end database is mainly MySQL and NoSQL as a supplement.

        Before the emergence of IT service models such as cloud databases, enterprises needed to build their own relational databases or NoSQL databases to use databases. They were called "self-built databases." The most essential difference between cloud database and these "self-built databases" is that cloud database is a database deployed in the cloud. It adopts SaaS service model. Users can use the database service through network leasing. It can be used wherever there is a network. No upfront payment is required. The investment and later maintenance are also relatively cheap. The cloud database is completely transparent to users, and users have no idea where their data is stored. Cloud databases usually adopt a multi-tenant model, that is, multiple tenants share one instance, and the tenant's data is both isolated and shared, thus solving the problem of data storage and reducing the cost of using the database for users. However, self-built relational databases and NoSQL databases themselves do not adopt the SaaS service model. They require users to build their own IT infrastructure and configure the database. The cost is relatively expensive, and they also need to perform computer room maintenance and database fault handling themselves.

Guess you like

Origin blog.csdn.net/java_faep/article/details/132754618