I first http://www.aliyun.com/zixun/aggregation/7415.html "> Self-introduction, I engaged in IT industry 10, years ago is an architect, now in an internet company as product manager, below is personal experience , as well as with some cloud computing architects to exchange the experience of the summary, the following on the Beijing-East Cloud Database For example, there are improper please forgive me.
What is a shared database
Talking about "shared database", the most confusing thing is "sharing" three words. "Sharing" lets us 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, is the embodiment of saving resources, and under normal circumstances, 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 database we created), we use the room to store things in the 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, some of your rooms will give you a label, take a name, is So-and-so (the name is the name you use the database later), and your rooms are completely isolated from others, there is no privacy exposure of the 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? such as saving food? 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). Incidentally, the current BAE database is on demand, SAE is up to 1G bar, Jingdong Jae is 25G free.
The characteristics of the cloud database of Jingdong
Following the Beijing-East Cloud (hereinafter referred to as "cloud") of the Cloud database features to do the 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 its own slave, and then synchronizes all the jproxy, avoiding Jmanager hangs when routing changes are causing inconsistencies.
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. (floating IP know what meaning, want to be an architect friend can search, here do not make a tiring statement)
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 Database Web site is: http://jae.jd.com, interested in this aspect of children's shoes can be seen, to register before use, but free.
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 in the near future may gradually drift away; Convenient and fast Internet services make cloud Platform the future of software services market, and the shared database will gradually reflect its value, to meet the 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!