1 00:00:00,000 --> 00:00:02,510 ‫The first kind of databases we're gonna see 2 00:00:02,510 --> 00:00:06,360 ‫is the relational databases and for it we have RDS. 3 00:00:06,360 --> 00:00:09,450 ‫RDS stands for Relational Database Service, 4 00:00:09,450 --> 00:00:11,360 ‫so it's very clear that it's only for 5 00:00:11,360 --> 00:00:14,790 ‫relational databases, and we'll be using the SQL language. 6 00:00:14,790 --> 00:00:16,640 ‫So it's a managed database service 7 00:00:16,640 --> 00:00:19,700 ‫for databases that will use SQL as a query language 8 00:00:19,700 --> 00:00:22,260 ‫and it will allow you to create databases in the cloud 9 00:00:22,260 --> 00:00:24,360 ‫that will be managed by AWS. 10 00:00:24,360 --> 00:00:26,510 ‫These databases can be of different kinds. 11 00:00:26,510 --> 00:00:30,630 ‫It could be a Postgres, MySQL, MariaDB, Oracle, 12 00:00:30,630 --> 00:00:34,750 ‫Microsoft SQL Server, and finally something called Aurora, 13 00:00:34,750 --> 00:00:38,010 ‫which is a proprietary database from AWS 14 00:00:38,010 --> 00:00:40,740 ‫which we'll be seeing in this lecture as well. 15 00:00:40,740 --> 00:00:42,630 ‫So, why would we use RDS 16 00:00:42,630 --> 00:00:45,730 ‫instead of deploying our own database on EC2? 17 00:00:45,730 --> 00:00:48,680 ‫Well, RDS is a managed database service. 18 00:00:48,680 --> 00:00:51,600 ‫So, provisioning the database will be automatic. 19 00:00:51,600 --> 00:00:53,470 ‫The patching of the operating system 20 00:00:53,470 --> 00:00:55,370 ‫will be done by AWS. 21 00:00:55,370 --> 00:00:57,890 ‫We will have continuous backups and restore options 22 00:00:57,890 --> 00:00:59,520 ‫with point in time restore. 23 00:00:59,520 --> 00:01:00,850 ‫We'll have monitoring dashboards, 24 00:01:00,850 --> 00:01:02,630 ‫to see if our database is doing good. 25 00:01:02,630 --> 00:01:06,010 ‫We'll be able to scale the reads by creating a read replicas 26 00:01:06,010 --> 00:01:07,770 ‫and improve the read performance. 27 00:01:07,770 --> 00:01:11,000 ‫We will have the way to set up multi AZ to make sure 28 00:01:11,000 --> 00:01:14,940 ‫that we're ready to have a plan for disaster recovery 29 00:01:14,940 --> 00:01:17,950 ‫against an whole availabilities on going down. 30 00:01:17,950 --> 00:01:20,480 ‫And, finally, we can set up maintenance windows 31 00:01:20,480 --> 00:01:23,020 ‫for upgrades and we can scale vertically 32 00:01:23,020 --> 00:01:24,220 ‫and horizontally. 33 00:01:24,220 --> 00:01:26,340 ‫This storage is going to be backed by EBS, 34 00:01:26,340 --> 00:01:29,040 ‫would it be a gb2 type or io1 type volume, 35 00:01:29,040 --> 00:01:31,250 ‫and the only thing that we cannot do 36 00:01:31,250 --> 00:01:34,370 ‫with an RDS database is that we cannot SSH 37 00:01:34,370 --> 00:01:36,180 ‫into your RDS database instance. 38 00:01:36,180 --> 00:01:38,056 ‫Okay, we're just using the service 39 00:01:38,056 --> 00:01:40,840 ‫AWS manage the entirely the database for us 40 00:01:40,840 --> 00:01:43,490 ‫so we cannot use the SSH utility to see 41 00:01:43,490 --> 00:01:46,200 ‫what's going on within our database. 42 00:01:46,200 --> 00:01:47,900 ‫Okay, so where does RDS fit 43 00:01:47,900 --> 00:01:49,780 ‫within our solution architecture? 44 00:01:49,780 --> 00:01:51,430 ‫Well, we have a load balancer 45 00:01:51,430 --> 00:01:54,840 ‫and it's fronting multiple backend EC2 instances. 46 00:01:54,840 --> 00:01:57,420 ‫They are possibly into an auto scaling group. 47 00:01:57,420 --> 00:02:00,290 ‫And they need to store and share the data somewhere 48 00:02:00,290 --> 00:02:02,310 ‫and this is structured data so they're not going 49 00:02:02,310 --> 00:02:05,900 ‫to use EBS or EFS or EC2 instance store. 50 00:02:05,900 --> 00:02:07,590 ‫They will be using a database 51 00:02:07,590 --> 00:02:08,840 ‫and in this example, 52 00:02:08,840 --> 00:02:12,460 ‫it is a relational database, so SQL-based. 53 00:02:12,460 --> 00:02:16,240 ‫And the EC2 instances will be connecting to database 54 00:02:16,240 --> 00:02:18,930 ‫and doing read/writes and all at once. 55 00:02:18,930 --> 00:02:21,540 ‫So they will be sharing the database in the backend. 56 00:02:21,540 --> 00:02:24,040 ‫And this is a classic solution architecture 57 00:02:24,040 --> 00:02:27,430 ‫not just using RDS but using any kind of database. 58 00:02:27,430 --> 00:02:29,010 ‫You have the load balancer layer 59 00:02:29,010 --> 00:02:30,840 ‫that will be taking the web request, 60 00:02:30,840 --> 00:02:34,390 ‫the backend EC2 instances doing the application logic 61 00:02:34,390 --> 00:02:36,710 ‫and the last tier which is (mumbles) 62 00:02:36,710 --> 00:02:38,960 ‫which is the database here doing the reads 63 00:02:38,960 --> 00:02:40,960 ‫and the writes of the data. 64 00:02:40,960 --> 00:02:42,550 ‫Okay, so this is for the RDS. 65 00:02:42,550 --> 00:02:43,930 ‫So now for the Aurora, 66 00:02:43,930 --> 00:02:45,320 ‫so Aurora is going to be 67 00:02:45,320 --> 00:02:47,720 ‫a database technology created by AWS. 68 00:02:47,720 --> 00:02:49,190 ‫It's not open sourced. 69 00:02:49,190 --> 00:02:50,930 ‫And it works the same way as RDS, 70 00:02:50,930 --> 00:02:53,810 ‫we have our EC2 instances connecting directly 71 00:02:53,810 --> 00:02:55,600 ‫into Amazon Aurora 72 00:02:55,600 --> 00:02:58,530 ‫and Aurora supports two kinds of database technologies. 73 00:02:58,530 --> 00:03:01,740 ‫It supports PostgreSQL and MySQL. 74 00:03:01,740 --> 00:03:03,580 ‫The idea with Aurora is that 75 00:03:03,580 --> 00:03:05,210 ‫it's going to be cloud optimized 76 00:03:05,210 --> 00:03:07,770 ‫and so there is a 5x performance improvement 77 00:03:07,770 --> 00:03:09,320 ‫over MySQL on RDS 78 00:03:09,320 --> 00:03:14,100 ‫and a 3x improvement over using Postgres on RDS. 79 00:03:14,100 --> 00:03:15,960 ‫On top of things, we don't need to worry 80 00:03:15,960 --> 00:03:17,730 ‫about the storage of an Aurora database 81 00:03:17,730 --> 00:03:19,970 ‫because the storage will grow automatically 82 00:03:19,970 --> 00:03:23,644 ‫in increments of 10GB, up to 128TB. 83 00:03:23,644 --> 00:03:26,520 ‫Even if Aurora is going to be more expensive than RDS, 84 00:03:26,520 --> 00:03:29,090 ‫about 20% more, it's going to be more efficient 85 00:03:29,090 --> 00:03:31,150 ‫and so it should be more cost effective. 86 00:03:31,150 --> 00:03:33,650 ‫Finally, Aurora is not something that's included 87 00:03:33,650 --> 00:03:37,760 ‫into the free tier of AWS but RDS is, okay? 88 00:03:37,760 --> 00:03:39,310 ‫So from an exam perspective, 89 00:03:39,310 --> 00:03:42,220 ‫RDS and Aurora are going to be the two ways 90 00:03:42,220 --> 00:03:45,140 ‫for you to create relational databases on AWS. 91 00:03:45,140 --> 00:03:46,440 ‫They're both managed 92 00:03:46,440 --> 00:03:48,480 ‫and Aurora is going to be more cloud native 93 00:03:48,480 --> 00:03:50,840 ‫whereas the RDS is going to be running the technologies, 94 00:03:50,840 --> 00:03:53,890 ‫you know, directly as a managed service. 95 00:03:53,890 --> 00:03:56,340 ‫Now, will see you in the next lecture just to give it a go 96 00:03:56,340 --> 00:03:58,223 ‫and try to create our first database.