I have a small single-instance deployment running on an EC2 instance which hosts both a web application and its database (MySQL). I've been looking to separate the deployment out into an EC2 instace for the web app and an RDS cluster for the database, and wanted to take advantage of the new AWS Savings Plans for both if possible.
My questions the are:
AWS Savings Plans seem to only apply to 'pure' compute EC2 instances, not to RDS instances as well. Can someone confirm or disprove this?
If Savings Plans did apply to RDS instances, is there a reason to not use them, and instead just use an Instance Reservation?
Since August 2020, AWS Savings Plans includes:
Amazon EC2
AWS Lambda
AWS Fargate
They do not apply to Amazon RDS db instances. For those, you can continue to use Amazon RDS Reserved Instances.
I want to clarify that even though Savings Plans do not cover RDS instances, they do cover EC2 instances that are part of EMR, ECS and EKS Clusters. Based on this link:
"Both plan types apply to EC2 instances that are a part of Amazon EMR, Amazon EKS, and Amazon ECS clusters. Amazon EKS charges will not be covered by Savings Plans, but the underlying EC2 instances will be. "
Also, Compute Savings Plans also apply to your Fargate and Lambda usage.
We moved to RDS from EC2 instances running self installed MySQL years ago. For me, at has been great. All of the RDS features work flawlessly, point and click, without the mundane work of spinning up, replicating, backing up, and failing over databases. It simply works great. Use reserved instances if you plan on keeping for at least a year. At 30% savings the cost is awash even if you bail on the server after about 9 months and don't use the entire year. Plus you can sell the unused remaining on the marketplace.
Downsides?
You do NOT get command line OS access to the MySQL server. You get an admin login to mySQL. The only way to manage it is through the AWS UI and the mysql client command line or managing client (like MySQL Workbench or Heidi).
You may want to run a mysqldump script on a separate EC2 to dump databases separately/additionally. AWS does SNAPSHOTS which require an entire restore of a sandbox server just to get a single table someone botched up, for example. I go to the MySQLdump files all the time. Never have needed the SNAPSHOT unless I am spinning up a sandbox copy of the entire instance for some reason.
In a nutshell, mySQL on RDS is great.
One other side note. We migrated an app using MySQL5.7 to Aurora MySQL with absolutely zero issues. Complete drop-in replacement (in our case).
Related
We need to know what are the best options to set AWS RDS instance (Aurora mysql) that is standalone and does not get traffic from actual RDS cluster.
Requirement is for our data team to write analytical queries but we do not want it to impact actual application and DB performance. Hence we need a DB which always has near to live data but live traffic or application does not connect to this instance.
Need to know which fits better, DL clone OR AWS Pilot light OR AWS Warn standby OR AWS hot standby OR
multi-AZ configuration.
Kindly let us know which one would fit our requirement better.
We have so far read about below 3 options,
AWS Amazon Aurora DB clone, https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Clone.html
AWS Pilot light or AWS Warn standby or AWS hot standby
. https://aws.amazon.com/blogs/architecture/disaster-recovery-dr-architecture-on-aws-part-iii-pilot- light-and-warm-standby/
With multi-AZ configuration, we can create a new instance in new AZ, so that his instance will have a different host (kind off, a fail over strategy), where traffic to his instance will be from our queries and not from live prod application, unless there is some fail over issue.
Option 1, Aurora cloning says
Run workload-intensive operations, such as exporting data or running analytical queries on the clone.
...which seems to be your use case here.
Just be aware that the clone will not see any changes to the original data after it is made. So you will need to periodically delete and re-clone to get the updated data
Regarding option 2, I wrote those blog posts, and I do not think that approach suits your use case. That approach is for disaster recovery
Option 3 may work. To modify it a bit, the concept here is to create an Aurora Replica, which as you say is a separate instance. The problem here is the reader endpoint for your production workload, it may hit that instance (which is not what you want)
EDIT: Adding new option 4
Option 4. Check out Amazon Aurora zero-ETL integration with Amazon Redshift. This zero-ETL integration also enables you to analyze data from multiple Aurora database clusters in an Amazon Redshift cluster.
Apologies if this isn't the right place to ask this question.
I'm looking to create an automated copy (backup) of my AWS RDS (MySQL) database daily and have this backup restored daily to another RDS instance and made available to another set of applications
I already have daily backups running and I can create a new rds instance from a backup but I want this to happen automatically within AWS.
Looking through AWS documentation and I can't find anything that fits this purpose but maybe there's a service that I'm not aware of.
AWS Aurora for MySQL and PostgreSQL support AutoScaling.
Autoscaling dynamically adjusts the number of Replicas available for cluster based on different metrics and policy. When sudden workload increase it'll add move read replicas and when it'll decrease it'll also remove so you don't have to pay for it.
Aurora AutoScaling
AWS RDS doesn't support autoscaling but you can always scale horizontally and vertically manually.
Scaling Your Amazon RDS Instance Vertically Horizontally
I have taken a AWS Lightsail Unix Instance for one of my pilot project, I wanted to explore AWS ecosystem and thought this would be a easy playground to start with. The plan I opted was a USD 5 per month, which gives 1 GB Memory, 1 Core Processor, 40 GB SSD Disk and 2 TB Transfer.
After subscribing I created a LAMP instance and a Plesk Instance, assigned static IPs to both instances and setup connections from my PC to transfer files using PuTTY; also setup access to Plesk and phpMyAdmin to start work.
In the first month itself, I am seeing a huge bill of USD 985 for using AWS RDS, details in bill are as below:
Amazon Relational Database Service for MySQL Community Edition
$1.080 per RDS db.r4.xlarge Multi-AZ instance hour (or partial hour) running MySQL
My question is - When I created LAMP, does it create a AWS RDB service automatically, I have hardly used MySql for anything. It seems AWS Lightsail is throwing hidden charges without notifying customers about actuals.
No, creating a LAMP stack on Lightsail does not create an RDS instance on your behalf. With the LAMP stack on Lightsail, the MySQL database is installed on that instance alongside PHP and Apache - there is no charge beyond the $5.00 / month (in your case) as long as you don't go over the data transfer limit.
I can't say why you're getting charged for RDS, but it's not because you fired up Lightsail instances.
Thank you folks!
I tried to go through several docs AWS provides on pricing. There is no indication that AWS RDB services automatically starts on LAMP installation. I wanted to take second opinion before raising a complaint with them. I have opened a case, and they have confirmed to revert the charges, however there is no clarity how AWS RDS service has started. At present I have removed all DB snapshots and backups.
I've been considering moving some databases from self-hosted database instances (e.g. MySQL or PostgreSQL on Linux, either bare-metal or within AWS itself) into Amazon RDS, but it's unclear to me how everything will behave once I've created the database and it's time for maintenance to begin.
For example, I have to choose the type of instance(s) that will be used for the database, which I guess means how responsive everything will be, and there is an option for multi-AZ deployments, but it's not clear how many of those types of instances I'm actually configuring. (Presumably, multi-AZ deployment requires at least two instances).
There are options for Failover, which leads me to believe that I can rely on the service to stay up if there are problems with an instance, but then there is also a section for selecting maintenance windows for automated upgrades, which I find confusing. If I were administering e.g. a two-instance MySQL setup, I'd upgrade one instance and then the other to avoid any downtime. Is that not how RDS behaves?
RDS advertises support for automatic "minor version upgrades" (yes, please), but doesn't say anything about OS upgrades. Presumably, the db engine will be running on Amazon Linux or something similar, and will periodically require updates to those packages. Does that all happen automatically, or do I need to manually perform those upgrades, etc.?
The whole point of using something like RDS is that the service should become something I no longer have to worry about: I don't have to deal with package maintenance, upgrades, failover, or unexpected downtime (as long as I pay enough, of course). But all of the options for the RDS instance are making me skeptical of the advantages provided by RDS over just running everything myself.
Can anyone with experience with AWS RDS comment on their experiences with maintenance, upgrades, and failover?
These were the same concerns which we had when we were planning to use RDS. Now that we are effectively using AWS RDS for multiple production workloads, let me try to clarify your queries. Hope this helps.
Your Question 1 : I have to choose the type of instance(s) that will be used for the database, which I guess means how responsive everything will be
Answer : Yes. This is to define what capacity (CPU,RAM etc) you will need for your database workload
Your Question 2 : There is an option for multi-AZ deployments, but it's not clear how many of those types of instances I'm actually configuring.
Answer : Multi-AZ deployments are to ensure high availability. AZ (Availability Zones) are isolated locations within an AWS Region to provide better protection against disaster scenarios. So when we choose a Multi AZ deployment, RDS will place 2 instances of your database server in 2 Availability Zones in the region where you are provisioning.
This is done automatically by RDS and we dont have to setup/maintain 2 servers separately/manually. ( Note : Your VPC should have atleast 1 subnet in each of the 2 different AZ to provision Multi AZ Setup)
Your Question 3: If I were administering e.g. a two-instance MySQL setup, I'd upgrade one instance and then the other to avoid any downtime. Is that not how RDS behaves?
Yes. RDS does it by itself without manual intervention if you enable Automatic Upgrades while setting up RDS (Only if you choose to have Multi AZ option)
Your Question 4 : RDS advertises support for automatic "minor version upgrades" (yes, please), but doesn't say anything about OS upgrades.
Answer : RDS dont expose/provide any OS access to us. The underlying OS and its upgrades/other activities are all done without affecting the RDS services hosted on top of it. We dont have to do anything about the OS of RDS. So we can forget about that part.
Your question 5 : Regarding Failover of AWS RDS Multi AZ database
I would classify into 2 cases.
Case 1 : Fail-overs required during maintenance/other automatic activities done by Multi AZ RDS instance.
Here, RDS will automatically do the failover one instance at a time. It will first move all the ongoing traffic to second instance and then upgrade/reboot the first instance and then do the same with second instance.
Case 2 : Fail-overs required during manual reboot/manually triggered actions done on Multi AZ RDS instance.
In this case, during the reboot, AWS RDS provides an option for you to select whether the reboot should be with failover or without one.
I am trying Amazon Aurora instance and I can not see an option to stop it. The only options are Delete and Reboot.
Am I missing something.
Edit: 2018/09/25 - Amazon Aurora Now Supports Stopping and Starting of Database Clusters
Per this announcement, Aurora now supports starting and stopping the db instance. This feature was released for other RDS configurations last year and generally behaves the same in this implementation. Stopping the database cluster stops the primary instance and any Aurora replicas. The database will remain stopped for 7 days, after which it will be automatically restarted.
Additionally, see:
AWS Documentation - Stopping and Starting a DB Instance
AWS CLI Documentation - aws rds start-db-instance
AWS CLI Documentation - aws rds stop-db-instance
Edit: 2018/08/13 - Serverless Aurora supports infrequent access workloads
Per this announcement, Serverless Aurora has been released and has a feature to pause compute capacity after N consecutive minutes of inactivity. Here's an example of this configuration from the announcement blog:
This value is configurable up to 1440 minutes (24 hours), and would be comparable to "stopping" an Aurora Instance because you are not paying for compute capacity while compute capacity is paused, only database storage.
If your use case includes infrequent access (example: a dev instance that is not used after-hours), then this is currently the easiest option available.
Edit: 2017/06/01 - RDS can now be stopped/started, per this announcement, but does not support Aurora yet.
In the AWS console, a 'Stop' option has been mentioned to the same menu described in the question body. A stopped instance retains its storage but cannot be modified until it is started again. Instances cannot be permanently stopped -- after seven days, a stopped instance will be automatically started again.
Unfortunately, some configurations still don't support this feature. See below the break for an alternative.
Additionally, see:
AWS Documentation - Stopping and Starting a DB Instance
AWS CLI Documentation - aws rds start-db-instance
AWS CLI Documentation - aws rds stop-db-instance
Alternative suggestion for incompatible configurations:
This includes:
Aurora via old SDKs prior to September 2018
Old SDKs prior to June 2017
RDS with Multi-AZ
RDS with read replica
RDS with SQL Server Mirroring
RDS instances in these situations cannot be stopped and started at-will like an EC2 instance. You can, however, approximate this behavior by deleting the RDS instance with a final snapshot, and then returning later to restore an RDS instance from that DB snapshot.
This is approximate to "stopping" because no new data will be written once your final snapshot is taken, and you also won't be paying for a running RDS instance. In the same way that you would pay for any EBS volumes attached to your stopped EC2 instance, you will likewise continue paying for the storage of the DB snapshot while it exists.
This behavior diverges from stopping an EC2 instance inthat the underlying infrastructure will no longer exist. When you restore from snapshot, that will be on a new RDS instance and that restoration will take some time to complete, depending on the size of both your infrastructure and snapshot.
Further Reading
AWS RDS Documentation - Delete Instance with Final Snapshot
AWS RDS Documentation - Restoring From a DB Snapshot
They did add support for stopping/starting RDS instances this month (June 2017). The key bit of info from #Venkata's link is: "The stop/start feature is available for database instances running in a Single-AZ deployment which are not part of a Read Replica (both source and replica) configuration."
This means it does not work for Aurora because it is Multi-AZ by default. You do not even receive the option in the interface.
It also will not work for MySQL if a read replica is configured. You will not get the option on the slave and you get the option on the master but it fails if you try to use it.
You can achieve the same thing with a restore from a snapshot... but the down side is that takes roughly an hour with our large db instance whereas stopping it and starting it can happen in ~5 minutes.
They just added support for this today:
https://aws.amazon.com/about-aws/whats-new/2017/06/amazon-rds-supports-stopping-and-starting-of-database-instances/
Enjoy! :)