make clear the purpose and main theme from the very beginning , You should not use self built on Alibaba cloud MySQL or SQL Server database , by the way , also Oracle or PostgreSQL database .

Cloud database RDS(Relational Database Service) It's stable and reliable 、 Scalable online database services . Based on Apsaras distributed system and all SSD Disk high performance storage , Support MySQL、SQL Server、PostgreSQL and PPAS( Highly compatible Oracle) engine , The primary and standby architectures are deployed by default and disaster recovery is provided 、 Backup 、 recovery 、 monitor 、 A complete set of solutions for migration, etc .

Of course , Not all users , There are conditions , Including but not limited to the following two points :

  1. Your website or project has developed to a certain stage , The database needs to be independent , No longer on the same machine as a website program or application ECS On ;
  2. Even if you have a developer or operator who knows a lot about databases , You shouldn't build your own database , Because let development focus on program development , Let operation and maintenance focus on operation and maintenance automation , This is the decision to maximize production .

There are also individual cases : You may have a small database technology team , such as 2、3 personal , You shouldn't build your own database , Because it usually requires maintenance of the entire infrastructure , For example, network load balancing ( Management switch )、 Data reliability ( disk raid)、 middleware ( Read / write separation )、 Auto fail over ( Active standby switching )、 Master slave architecture ( Data synchronization ) wait . These skills are not necessarily DBA Metropolis , Like network devices , Is there another job of network engineer to be added , For the increase in costs , Have you considered ?

However , For alicloud database RDS Come on , The above needs are already in place , So the database DBA We should focus on business-related optimization . Because that's what it is iaas( Infrastructure as a service ) The essence of .

however , We still need to analyze it clearly , Why use RDS, What's good about it ?

Let's plug in a little benefit first : Get alicloud lucky ticket with one click , After receiving the coupon, place an order to buy Alibaba cloud products , Enjoy all the discount on the official website , You can also take part in the lucky draw ~

Alibaba cloud database RDS It includes 4 Kind of :MySQL/SQL Server/Oracle/PostgreSQL, Let's start with one of them RDS for MySQL Well .

RDS for MySQL There are currently three versions :5.7、5.6、5.5:

  1. The first recommendation is 5.6, because 5.6 And 5.5 comparison , A lot of performance optimization , Ali's database team , towards mysql There are a lot of patch, It is the biggest technology contributor in China . and 5.6 It's been around for a while , Very mature and stable ,5.6 and 5.5 The compatibility is also very good , The author has used a number of different scenarios of 5.5 Database to 5.6, No compatibility issues . If there is no special reason, we must 5.5, I suggest you choose 5.6 La . in addition ,5.6 In the aspect of master-slave synchronization, semi synchronous mode is also adopted , instead of 5.5 The asynchronous , This ensures the reliability of the data .
  2. 5.6 There is also a very important function , It's the separation of writing and writing , At present, only 5.6 Support , My project has been using this function for several months , Very easy to use , It's very reassuring , I think this may be the dream function of the Internet e-commerce project . Need to know , You build a separation between reading and writing , Generally, open source middleware is used as the proxy layer , This requires you to be very familiar with the usage of this middleware , Including setting weights 、 threshold 、 Health checks and so on , This greatly increases the cost of learning , Otherwise, don't you worry that there is something wrong that can't be solved ? in addition , Using open source middleware , Before the data reaches the database, it needs to go through the statement parsing and forwarding of multiple components , It has a great influence on response delay . and RDS Read write separation is directly built into the existing high security link , There are no extra components to consume time , Can effectively reduce latency , Speed up processing .
  3. No matter 5.6 still 5.5, High availability versions are available , I strongly recommend Internet e-commerce 、 Games and other projects use it , This version adopts a high availability architecture of one main and one standby , At the same time, local ssd Storage , In case of failure, the active and standby instances will be switched automatically . That's all , You can't build your own database , It can be said that the main database of most companies is a single mysql example , In case of machine failure, it can only be shut down , Can't switch automatically . This is not to say that these companies don't want to use a high availability Architecture , It's really a threshold , You think you can build two according to the online tutorial master, Just monitor it with heartbeat software ? In the wrong , Later maintenance is often much more difficult than the initial environment , It's not just mysql Its high availability , It must also be combined with its own business situation . I used to work in a large e-commerce company , Have a database team , Once wanted to do such a high availability Architecture , But I've been afraid to go online , The reason is that there are all kinds of problems in reality , There is no perfect solution .
  4. 5.6 It also offers the financial version : Adopt the architecture of one main and two standby , Through the log “ Multi replica synchronous replication ”, Ensure strong consistency of data , So it's especially suitable for finance 、 negotiable securities 、 The core database of the insurance industry . and , Between high availability and Finance , It can be switched , Like not like ?
  5. Some people say RDS It costs more than self built MySQL Used ECS The server , The same configuration costs a lot . you 're right , It's really more expensive , You know, it just said , It's two examples of one main and one standby , You build it yourself. If you use two ECS Realization , More expensive , And it doesn't take into account whether it's easy to use , See? ?
  6. Provide comprehensive monitoring and diagnosis : Thread memory 、SQL Monitoring of resource consumption, etc , Help users diagnose problems quickly . This is also the point , The self built database can be said to have no such monitoring , Only slow queries can be recorded , Third party tools are used to analyze logs , Further , Use some open source tool platforms , such as zabbix, Brought some mysql Basic monitoring , If you want to go further , You may need to install other plug-ins , For example, there is a famous zabbix for mysql The plug-in is called fpmmm Of , I have been using . But even so , I still don't think it can compare with RDS Monitoring items provided , Need to know , Analyze a fault in reality , It needs a combination of various means to assist analysis , It's not that more monitoring charts are provided , I'm sure I can find out .
  7. Backup : Including data backup and log backup ,RDS provide , And for backup , More important is to recover and check data integrity . I want to ask you , How many people didn't make a backup , How many people have done backup , But there is no time to recover , in other words , Did you make the right backup , Have you verified , Are you going to verify it on a regular basis ? I'm afraid it's a matter of human and material resources , None of this is going to be done .RDS Provides a very important recovery method , There are three kinds of : It's called read-only instance 、 Clone instance 、 For instance a disaster . It's literally understandable what they do , How to use it in detail or go to see RDS Document bar .
  8. CloudDBA It's monitoring and management RDS Instance performance and health services , stay RDS The instance management page of the console , At present, it only applies to MySQL Instance of type . in the light of SQL Statement performance 、CPU Usage rate 、IOPS Usage rate 、 Memory usage 、 Disk space usage 、 The number of connections 、 Lock information 、 Hot list, etc ,CloudDBA Intelligent diagnosis and optimization functions are provided , It can find the existing or potential health problems of the database to the maximum extent .CloudDBA The diagnosis of is based on a single instance , The diagnosis will provide details of the problem and corresponding solutions , It can bring great convenience for you to manage the running status of the instance . Currently only supported 5.6 and 5.5.
  9. Now say 5.7, It's recently launched , The key to it is the stand-alone version . Compared with the standard dual machine high availability version , The stand-alone basic version only provides one database node , Through the underlying data storage layer to ensure the reliability of multiple copies of data . Reduction of database nodes , Greatly reduced CPU And memory resources , So as to reduce the overall input cost . Because for individuals 、 For SMEs , Be able to accept short downtime ( Of course, if it's well maintained , This basically doesn't exist ). Its price , It is equivalent to the self built database , But it still provides the various functions of the previous points , Therefore, it is highly recommended that SMEs use .
  10. Security , It's also a concern of many people . Cloud database RDS Provides a variety of security reinforcement functions to ensure the security of user data , Including but not limited to :

* The Internet :IP White list 、VPC The Internet 、SSL( Condom layer protocol )、SQL A firewall
* Storage :TDE( Transparent data encryption )、 Automatic backup
* disaster : Disaster tolerance in the same city ( Multiple zone instances )、 Disaster tolerance in other places ( Two places and many centers )

11. Database management : I've used the command line 、navicat、phpMyAdmin And other tools for daily database maintenance , I guess most people do the same .RDS Use “ Data management DMS”: Provide relational database and NoSQL Unified management of . It comes from Alibaba database service platform iDB, Provide database R & D support for tens of thousands of R & D personnel , Has been run online 8 year . You can use data management DMS It's easy to build an enterprise's unique database DevOps, Promote the self-help of database research and development , Improve R & D Efficiency , At the same time, ensure the security of employee database access and high performance of database . The default is the free version , It can meet the needs of most people , If it's not enough , You can buy the premium version , Provide more powerful functions , Please refer to the product documentation for details . What I want to say is : You just need to have a browser , You can manage your own database .
12. Some people say , Said so much , How about the performance , I suggest you experience it yourself , Attach a picture :

13. How to move from self built database to RDS, Please look at the documentation :

Now? , Do you agree with me :RDS Is it better than building your own database ?

Purchase address : Alibaba cloud database RDS for MySQL, Remember to get the lucky ticket mentioned above , The length of the purchase is the same as yours ECS The server is consistent , Annual payment 8.5 fold , Two years 7 fold , Three years 5 fold .

to update : Some friends let me recommend the purchase configuration , This is actually related to our own project . I once followed an e-commerce project for a short time , Every day there are several to more than a dozen seconds to kill , On a larger scale ,ECS The configuration of the server is 8 nucleus 16G Of , At that time, the database was detached from the local machine , bought RDS, The selected configuration 5.6 High availability version , The hardware is 4 nucleus 16G, The storage is 100G, The website is very smooth to use , This is also due to the good front-end brush protection . Of course , except ECS and RDS, It also uses things like OSS、CDN、WAF Products such as , combination nginx Filtering and program anti brushing mechanism and so on .

From the perspective of operation and maintenance, analyze the use of alicloud database RDS The necessity of -- You should not use self built on Alibaba cloud MySQL/SQL Server/Oracle/PostgreSQL More articles on the database

  1. Kubernetes Operation and maintenance Ecology -Heapster analysis

    Heapster stay Kubernetes The operation and maintenance ecology is as follows : Monitor data convergence layer of cluster container heapster1.0 After the release, the interior is divided into event and metric Two processes , It can be used as two docker The mirror is deployed as two independent ...

  2. From the perspective of operation and maintenance Iaas、Paas、Saas Cloud computing

    Usually our operation and maintenance work , It's about understanding the needs . Application server . configure network . Server software installation . Application deployment . data storage . System tuning . Platform maintenance, etc according to Iaas.Paas.Saas To divide our usual tasks : At the bottom of the Iaas Stratification ...

  3. SQL Server 2008 R2 Database backup files .bak How to mount to 【 Alibaba cloud · Independent virtual host database 】 On

    1. Preface 8 The month has just begun , company [ workflow ] Hang up , The physical server will restart automatically , The database doesn't work , It's a matter of calculating salary Commission , Don't be careless ! In a physical server , eureka OA Page source code and database .MDF And .LDF Wait for the documents . ...

  4. Kubernetes Operation and maintenance Ecology -cAdvisor analysis

    Kubernetes In the ecology of ,cAdvisor It is collected as container monitoring data Agent, It's deployed on each node , The internal code structure is roughly as follows : The code structure is very good ,collector and storage Some of them can be developed incrementally ...

  5. 【SQL server primary 】SQL Server 2005 Realize database synchronous backup The process -- result --- analysis

    Database replication :   Simply speaking , Database replication consists of two servers , Primary and backup servers , After the master server is modified , The backup server is modified automatically . There are two modes of replication : Push mode and request mode , Push mode is after the master server is modified , Automatically send to backup server , ...

  6. SQL Server 2005 Realize database synchronous backup The process -- result --- analysis

    Database replication :   Simply speaking , Database replication consists of two servers , Primary and backup servers , After the master server is modified , The backup server is modified automatically . There are two modes of replication : Push mode and request mode , Push mode is after the master server is modified , Automatically send to backup server , ...

  7. Netflix Business operation and maintenance analysis and summary

    Catalog Netflix Analysis and thinking of working environment Why? Netflix It's going to be so extreme ? Technical architecture and challenges under massive business scale More reasonable organizational structure and advanced tool system and concept A corporate culture of freedom and responsibility The current problem : Select questions ...

  8. Truly cloud based intelligent operation and maintenance system , Alibaba cloud releases ECS Automated operation and maintenance Suite

    The development of Cloud Computing , Promote the automatic operation and maintenance .DevOps.AIOps And so on , In today's fast changing business , Enterprises hope to improve the efficiency of operation and maintenance through a set of automatic operation and maintenance expert system , Support the business . In the traditional way , Build a mature set of DevO ...

  9. From one to ten thousand , say VM/Docker/Kubernetes/ServiceMesh

    Abstract : This article starts from the history of single machine operation , Step by step introduce virtualization . Containerization .Docker.Kubernetes.ServiceMesh Development history of . And it focuses on the containerization stage , Installation of key technologies . Use . Operation and maintenance knowledge . so to speak ...

Random recommendation

  1. Java Basic writing document —— Write files through buffered streams (StreamOutputToFile)

    Console program , Generate some binary integer values and write them to a file . import java.nio.file.*; import java.nio.*; import*; public cla ...

  2. [ translate ][MVC 5 + EF 6] 2: Basic addition, deletion, modification and query (CRUD)

    original text :Implementing Basic CRUD Functionality with the Entity Framework in ASP.NET MVC Application 1. modify Vi ...

  3. In Africa MVC Environmental use Razor engine

    Razor Engine download address : analysis Model: string template = "Hello @Model.Nam ...

  4. Unity Using multiple constructors in

    If the class to be instantiated has only one constructor , The usage is very simple. The usage is as follows : 1 2 3 4 5 6 7 using (IUnityContainer container = new UnityContaine ...

  5. Elasticsearch Advanced search sorting ( chinese + pinyin + The first letter + Simple and complex conversion + Special symbol filtering )

    One . Demand first : 1. Chinese search . English Search . Mixed search between China and Britain   Such as :" Nanjing East Road ","cafe Nanjing East Road store " 2. Total search . Initial search . chinese + full pinyin . chinese + Search for initials   Such as ...

  6. Blue Bridge Cup - Langdon ants -java

    /* ( Program header comments start ) * The copyright and version declaration part of the program * Copyright (c) 2016, Student of Information Engineering Department of Guangzhou Vocational College of science, technology and trade * All rights reserved. * File name : ...

  7. use for Loop filter parity table column

    Just give me an example : var tr = table.getElementByTagName('tr');        // obtain <tr> label : var body =false; // Defining variables bod ...

  8. kaldi Of TIMIT Instance of a

    TIMIT The voice library is IT and MIT Cooperative phoneme level tagging speech library , For the development and evaluation of automatic speech recognition system , Including from American English ,8 There are three regional dialects ,630 personal . Everyone reads 10 A sentence , Every pronunciation is phoneme level . Word level text tagging ,16k ...

  9. 【Codeforces Round 1120】Technocup 2019 Final Round (Div. 1)

    Codeforces Round 1120 This game did \(A\).\(C\) Two questions , ranking \(73\). \(A\) In fact, the title is a little puzzling ... I feel like I can find a counterexample ( Now my algorithm is right ... ...

  10. pygame Draw text

    def drawText(self,text,posx,posy,textHeight=48,fontColor=(0,0,0),backgroudColor=(255,255,255)): font ...