"Shared database" in cloud computing

Source: Internet
Author: User
Keywords Enjoy cloud computing

With the advent of cloud computing, there are many new nouns, such as cloud database, cloud storage, elastic expansion, resource isolation and so on. The following is the hot "shared database" for everyone to explain what is called "shared database".

I introduce myself first, I am engaged in IT industry 10, was an architect many years ago. Below is a personal experience, as well as with some Google, BAT, Jingdong and other companies cloud computing architects to get the summary of the experience, for you to analyze what is a "shared database."

What is a shared database

Talking about "shared database", the most confusing thing is "sharing" three words. "Sharing" allows us to think of its antonym, "exclusivity". Yes, "shared database" is a comparison of "exclusive database" of a user resource ownership of the database title, it is accompanied by the cloud after the creation of a database, to save resources for the purpose, and in general, their own server or PC installed on the people do not share the data called "Exclusive database." Many people do not understand the characteristics of the shared database, then I will briefly introduce.

Comparison of characteristics between shared database and exclusive database

Before you introduce a shared database, analyze what is called the "exclusive database." "Exclusive Database", as the name suggests, "exclusive" is their own database, before the cloud came out, we have little exclusive database concept, because there is no comparison, that all the database should be called the exclusive database. "Exclusive database" For example, we have a piece of land (this one has an address and a number, like database IP and port), I built a house on this piece of land. When the warehouse (similar to the one we created), we use the room to store things in this House (similar to the way we can create a Table). )。

"Shared Database" is to save resources, reduce the cost of developers born, many people together to use the building, but this building is not a specific person, is the employer's assets. In the cloud-platform world, employers are providers of cloud databases, such as the Beijing-East Cloud, and the people who use the service are called "tenants." We use a database together, you have permission to create a table, modify the table's permissions, but do not create a database, modify the database permissions, because this building is everyone, not you alone, and you, just one tenant. Of course, a few of your rooms will give you a label, take a name, is So-and-so (the name is your future use of the database name); Your rooms are completely isolated from other people's rooms, and there is no privacy problem.

"Shared database" tenants ' rents are cheaper because they are charged on demand or even free. "On-demand" is a common feature of the cloud platform, because your room is for storing things, like your database tables are used to save data, in the past you use the exclusive database, you bought a cloud database, is a one-time investment, like you spend a lifetime of savings to buy a house, But do you really need the room to save your stuff? Maybe you don't know how many things you have. The birth of a shared database solves this problem, in general, how many things you have, how much you rent the room, the landlord charge you how much. This is called pay on demand. There are many cloud platforms with such services, such as Baidu's BAE, Sina's SAE, Jingdong JAE (ie, cloud). Currently BAE's database is based on space charges, and SAE is charged for both space and flowmeter. Jing Dong's JAE is currently within 25G free.

The characteristics of the cloud database of Jingdong

Below take Beijing East Cloud Engine (hereinafter referred to as "cloud engine") cloud database for example to do introduction. Cloud Engine is an application-hosted cloud platform that belongs to the PaaS layer in the cloud computing model. Jingdong Cloud Database is divided into exclusive and shared database two, in the cloud using a shared database, because the cloud is a PAAs platform, (I do not introduce the PAAs platform, we go to Baidu, Google). I'm just saying it briefly. The main feature of the PaaS platform is to conserve resources, on demand, so the cloud engine uses a shared database. Here is a brief introduction to its characteristics:

First look at my hand-drawn architecture:

  

(Note: Does not represent the true architecture of the Yun database, only for illustration of clear issues)

1. Tenant segregation. Multiple tenants sharing the same database instance necessarily requires an effective isolation scheme to prevent a user's slow query request or malicious request from affecting other user access. The isolation implemented here is to intercept all users ' access through the jproxy layer, and according to the index information of the data table accessed by the user, to pre-contract the resource required by the user to execute the request, and to intercept the malicious request and affect other user's request. At the same time in order to accurately control the use of each user's resources, the entire system for users to use the number of connections, memory footprint, disk space usage, bandwidth flow, etc. have done an effective record and monitoring and control according to the user's quota.

2. Cluster routing information high consistency protection. The whole cluster adopts the classic weakly centralized cluster structure, and has enough controllability at the same time to meet the high performance of the cluster, Jmanager manages the whole cluster routing information, and avoids the single point of failure through multiple Slave, when the routing change, Jmanager first synchronizes the routing change information to own Slave, and then all jproxy are synchronized, avoiding the jmanager of routing changes when they are dropped.

3. High availability protection. Overall cluster all nodes have no single point, the user's database will be zookeeper from the high availability, if the owner of the library hang up, will automatically switch to from the library, and rebind floating IP to from the library, will not affect the user's services.

4. User database seamless upgrade expansion. When the user's database data grows beyond the specified quota, the user can choose to upgrade the database, and the system automatically migrates the user database to a more idle instance based on the resource pool usage, and does not affect the user's service during the migration. Through the timing of automatic snapshot of the user database, combined with database Binlog synchronization tools to help users achieve incremental backup, migration is also dependent on these tools to complete the work.

5. Shared databases based on security considerations, it is better not to use the Create database than the Jproxy to restrict the syntax of databases that have potential security risks, just mentioned this House except you use, others also use, you only have these several or dozens of rooms just, You can only fool around in these few or dozens of rooms, you can't go to someone else's room!

Cloud Engine Cloud Database Web site is: This aspect of interest in children's shoes can be seen, is currently free to use.

Summary

After the advent of cloud computing, for enterprises, entrepreneurial teams, individuals brought convenience, the building of the computer room, buy or rent servers to build the environment, middleware, deployment of applications, the domain name and waste a lot of manpower and resources of the era, I believe that in the near future may gradually drift away; On-demand, convenient and efficient internet services let cloud platform become the future of the software services market darling, and the shared database will gradually reflect its value, to meet a new tomorrow, the relevant talent needs will be followed. I wish China's cloud computing has a vast space for development, more and more people for its services!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.