Amazon AWS Certified SysOps Administrator Associate – Databases for SysOps Part 8

  • By
  • May 27, 2023
0 Comment

15. Aurora for SysOps

Okay, so one last quick bit of information regarding Aura for your sysps exam. So you can associate a priority tier between zero and 15 on each read Replica and this is helped in case you want to control the failover priority. So RDS will promote a read Replica with the highest priority, so the lowest tier. And if two Replicas have the same priority, then Aura will promote the largest in size. And if they have the same priority and the same size, then it will promote a Replica at randomly. And one last thing, you can migrate an RDS MySQL Snapshot to an Aura MySQL cluster, which is a way for RDS to help you move up to Aurora to use this new service. The other thing is around Cloud Watch metrics for Aurora.

So you have a metric called the Aura Replica Lag, which is the amount of lag when Replicating updates from the primary instance. So if you have a look at this diagram as you write data into your Aura cluster, it’s going to be replicated and so there could be a lag associated with that. And so the Aura Replica Lag maximum is the maximum amount of lag across all database instances in the cluster and the minimum is the minimum of lag across all database instances in the cluster. Now, if your Replica Lag is high, that means that the users will have a different experience based on the Replica from which they get the data from because of this eventual consistency.

That means that, for example, a user, if it writes data and adds an item into a cart and then refreshes the cart, maybe the cart will miss the item, which is not a great experience, but this is due to the eventual consistency. So another type of metric to look at is database connections, which is the current number number of connections to database instance and the insert latency, which is the average duration of insert operations. So that’s it for Aurora. I hope you liked it and I will see you in the next lecture.

16. [SAA/DVA] ElastiCache Overview

Let’s talk about Amazon ElastiCache. So the same way you get RDS to have managed relational databases, ElastiCache is going to help you get Manage Redis or Memcache D, which are cache technologies. So what are caches? Well, they are inmemory databases with really high performance and low latency. And what the cache will help you with is to help reduce the load off of databases for read intensive workloads. The idea is that the common queries are going to be cache and therefore your database will not be queried every time. Just your cache can be used to retrieve the results of these queries. What this also helps you do is make your application stateless by putting the state of your application into Amazon Elastic cage.

And because we have the same benefits for RDS, adams will take the same maintenance of the operating system, the patching, the optimization, the setup, configuration, monitoring, failure, recovery and backups. Now, if you use Amazon cache, just so you know that it will require you to do some heavy application code changes for your application. This is not something you just enable and off you go. You have a cache. You need to change your application to query the cache before or after querying the database. And we’ll see the strategies in a minute. So now let’s talk about the architecture for using ElastiCache. And there could be many, but I’m just giving you an example. So let’s say we have Amazon Elastic cache, an RDS database, and your application.

The application will query ElastiCache to see if the query has already been made. And if this has already been made and it is stored in Elastic cache, then it’s called a cache hit. And then it just gets the answer straight from Elastic cache. And we were saving a trip to the database to do the query. Now, in case of a cache miss, then we need to fetch the data from the database. We’re going to read it from the database. And then for other application or other instances where the same query will be made, we can write the data back into the cache, such as the same query next time will result in a cache hit.

The idea is that it will help relieve load from your RDS database. And because you’re storing data in the cache, there must be a cache invalidation strategy to make sure that only the most current data is used in there. And this is the whole difficulty around using Caching technologies. Another architecture is around storing the user session to make your application stateless. So the idea is that your user will do a login into any kind of your applications and then the application will write the session data into Amazon Elastic cage. Now, if your user is redirected to another instance of your application, then your application can retrieve the session cage, the session directly from the Amazon SDK and therefore your user is still logged in and it doesn’t need to log in one more time. And so the idea is that now you made your application stateless by writing the session data of your user into Amazon ElastiCache. Now, something that can come up in the exam is for you to understand the difference between Redis and Mem cache D at a high level.

So Redis is a technology that allows you to do multiaz with Oto fell over, and the rereplicas used are used to scale the reads and also have High Availability. So this looks a little bit like RDS. There is also data durability thanks to persistence, and you have backup and restore features. So this looks a lot like RDS, whereas Memcache D is using multi node for partitioning of data, so called Sharding. There is no High Availability, there is no replication happening, it’s not a persistent cache, there is no backup and restore. And this is a multi threaded architecture.

So we have multiple instances altogether working in Memcache D with some Sharding. So the idea here that you need to remember is that Redis really is here for High Availability, backup, redeploy cache, this kind of stuff. Whereas Memcache is a pure cache that’s distributed where you can afford to lose your data. There’s no High Availability and there’s no backup and resource. So these are the main differences that you’re going to have between the two technology. So that’s it. I hope you liked it and I’ll see you in the next lecture.

17. [SAA/DVA] ElastiCache Hands On

So let’s try creating an Elastic Cage cluster. So we’ll go to the Elastic Cage service and then we’ll click on Get Started now, so we have two options for the cluster engine. We can either choose redis or Memcache D. So if you have redis, this is what we know. It offers multiaz with autofellover and enhance robustness. And we can even enable cluster mode if we wanted to, to have even more robust nest and scalability. So because it’s redis and it has persistence, we can use it as a database cache and message broker. Whereas if you choose Memcache D, then it’s a high-performance distributed memory object caching system. And this is really intended to serve as a pure cache, while redis can also be used as a database. So for the sake of this exercise, we’ll go ahead and just create a redis cluster engine.

But I invite you to explore the options from cached it. So we’ll say, okay, this is my first redis and my first redis instance. The engine version compatibility, I’ll just use the latest one. The port is the standard port for redis. So 6379. The parameter group is the one I’ll choose by default and the note type, because I don’t want to overpay, I’m not going to choose a cache or four x large. I’m going to go into T two and choose a T two micro which is within the free tier. I’ll click on Save and for number of replicas. Right now I don’t want anything else to zero, otherwise I’m going to pay more money.

So as you can see, if I had two, there was more options. There will be a multiaz with auto failover option. Or even if I have it as one, I should have that setting. Here we go. It’s still here. But if as soon as that I have it as zero, you can see that I’m losing the multi AZ. So let’s have it as zero and I lose the multiaz setting. So one I have it and zero I lose the multiaz. So we’ll keep it at zero because we want things to be free. But there you go. If there is a replica, obviously you can have multiaz. Then you need to create a subnet group. So I’ll create one and I’ll call it my subnet group, my first subnet group and my first subnet group. I’ll choose my VPC ID and I’ll select one of these subnets. Maybe EUs 38. I don’t have any preferred Availability zone. I’ll scroll down a security group. I can have a default one. Do we want encryption at rest using Kms? And do we want encryption in transit? And if we do select encryption in transit, then we can enable Redis off.

And with redis off, I’m able to set a token so I can set whatever I want. And this token will be necessary for my applications to connect to redis in order to work with redis. But if I disable encryption in transit. I have no options for redis off. Finally, do we want to import it into the cluster? No. Do we want backups? Absolutely. So we’ll say, yes, we want backups, and we want one day of retention. And this is a redis only feature. We don’t get backups with Memcache D and a Maintenance Windsor for anything. That’s fine. We won’t specify it. And I click on Create, and there we go.

Our Elastic Cache redis cluster, or it’s one instance, so it’s not really a cluster, but it’s one instance anyway is being created, and to use it I’m sorry, I can’t really demonstrate that to you. This is more an application specific concern. You need to download the redis driver and start interacting with your redis cache. But as far as we’re concerned, from an Exempt standpoint, we’ve seen how to create a redis cache. We’ve seen all the configuration options, and now the cache is just creating, but I don’t need it. So what I’ll do is just when this is done, I will remember to delete it. And so now I’m able to click on Actions and then delete my redis cluster. Once it’s been created, I can create a final backup. I’ll just say no, and I am done. All right, that’s it for this lecture. I will see you in the next lecture.

* The most recent comment are at the top

Interesting posts

SAP-C02 Amazon AWS Certified Solutions Architect Professional – Exam Preparation Guide Part 5

5. Exam Preparation – Domain 4 Hey everyone and welcome back. In today’s video we will be discussing about the important pointers for exams for domain four. So the first thing here is that you should know about tagging strategies, about resource groups, about the EC to pricing models here then the overview about S… Read More »

SAP-C02 Amazon AWS Certified Solutions Architect Professional – Exam Preparation Guide Part 4

4. Exam Preparation – Domain 3 Hey everyone and welcome back. Now in today’s video for important pointers for exams our focus would be on domain three. So the domain three is migration planning and it constitutes to be 15% of the examination. So let’s get started and see what are some of the important… Read More »

SAP-C02 Amazon AWS Certified Solutions Architect Professional – Exam Preparation Guide Part 3

3. Exam Preparation Part 02 – Domain 2 Hey everyone, and welcome back. Now, in today’s video, we will be continuing our journey, understanding some of the important pointers for exams for domain two. As we have discussed, even in the earlier video, be aware about the distinction on which use cases where DynamoDB would… Read More »

SAP-C02 Amazon AWS Certified Solutions Architect Professional – Exam Preparation Guide Part 2

2. Exam Preparation Part 01 – Domain 2 Hey everyone and welcome back in today’s video for important pointers. For exam, our focus would be on domain two. Now the domain two, which is designed for new solutions is one of the largest domains of this certification both in terms of the number of topics… Read More »

SAP-C02 Amazon AWS Certified Solutions Architect Professional – Exam Preparation Guide

1. Exam Preparation – Domain 1 Hey everyone and welcome back. Now in today’s video we will be discussing about some of the important pointers for exam as far as the domain one is concerned. Now the domain one is basically designed for organizational complexity and it constitutes to be twelve 5% of the overall… Read More »

SAP-C02 Amazon AWS Certified Solutions Architect Professional – New Domain 5 – Continuous Improvement for Existing Solutions Part 18

69. Building the function for our API Hey everyone and welcome back. Now in the earlier lecture we discussed that there are two important components that we need. The first is the function and second is the API. So what we’ll be doing today is we will be creating a function after function is created.… Read More »