I am testing a few different scenarios for RDS implementation. For regular RDS our development account has a lambda function that will stop all RDS instances if they have a certain tag identifying them as development DBs. When it ran today on a Custom RDS for Oracle DB it shut down the EC2 instance connected with it but it only said Configuration Not Available on the RDS side. The whole idea behind this shutdown lambda is to save money at the end of each day and shut down development machines. My question is the Custom Oracle RDS instance shut down or not? If not then how does one shut one down? Thanks
Related
RDS - MySQL
We recently had a database outage due to a minor engine version upgrade.
We have RDS multi AZ setup. I can clearly see in master instance that that is saying Multi AZ yes and it is in a different availability zone.
In master I see events as
DB instance has a DB engine update
backing up DB
Finished backup
DB instance shut down
DB instance resumed
In the replica I am also seeing an event at the time of the incident
"Slave is disconnected from the master and is attempting to reconnect.
I have also seen in following event in replica prior to incident
"The free storage for DB instance is low at 5%."
I am trying to understand why didn't master failover to standby during the DB instance patched up.
What would be the issue? how can I find out why the failover didn't happen?
Was this MySQL?
If so, see Will a Multi-AZ deployment help reduce downtime during an Amazon RDS MySQL modification?
Because RDS MySQL doesn’t automate rolling upgrades, the DB engine version upgrade happens to both the primary and standby hosts at the same time. Therefore, a DB engine version upgrade doesn't benefit from a Multi-AZ deployment.
Also, see Best Practices for Upgrading Amazon RDS for MySQL and Amazon RDS for MariaDB:
One common fallacy is that Multi-AZ configurations prevents downtime during an upgrade. We do recommend that you use Multi-AZ for high availability, because it can prevent extended downtime due to hardware failure or a network outage. However, in the case of a MySQL or MariaDB engine upgrade, Multi-AZ doesn’t eliminate downtime. The slow shutdown and the physical changes made on the active server by the mysql_upgrade program require this downtime.
Which is the best strategy to deploy .net Web application on AWS?
1. On EC2 instance where on single instance deploy both application and MS sql database.
2. On elastic beanstalk where the application is deployed on EC2 instance and database in RDS.
OR any other strategy.
What do you think?
This depends on your use case and budget. Running on the single instance is affordable but will be a single point of failure, and in case your instance goes down, your entire web app is gone. On top of that, any updates can be a nightmare. This is only ideal for development environments.
If you deploy via Beanstalk with external database, it will be expensive but it will be exponentially more fault tolerant. If your EC2 instance goes down, it will get replaced automatically (though you can achieve this even when using single instance. For prod, you must decouple your database instance from your environment, so you can run a database instance in Amazon RDS and configure your application to connect to it on launch. This enables you to connect multiple environments to a database, terminate an environment without affecting the database, and perform seamless updates with blue-green deployments.
Also, the 2nd option will be pretty convenient. All you have to do it give EB your application source bundle and it will do all the legwork. You can read more about EB and RDS setup here.
If I launch a RDS instance in one of my private VPCs, will that be able to update itself provided that I have enabled Auto Minor Version Upgrade?
Amazon RDS is a fully-managed service. All maintenance is performed by AWS "in the background" and does not involve traffic going through your VPC. (This also applies to snapshots and instance modifications, such as changing the DB instance type.)
Minor version upgrades may involve an outage period.
If you are running in Multi-AZ mode, then the Secondary server is upgraded, the Secondary server becomes the new Master server and then the old Master is updated and becomes the new Secondary server. This means that applications will be disconnect and need to reconnect to the database, but there is no outage period.
While hosting my web app on cloud, should I install my db on the EC2 instance or should i use RDS service ? Some points come up :
Backing up would be automatic as EC2 instances are also backed up.
Wouldn't automatic scaling of resources compensate for any automatic scaling of db that RDS would provide ?
You can do either, and I have done both, but the absolute better practice is to use RDS for your database and EC2 for the websites, unless you have a really good reason not to (and if you are not sure if you have a good reason, then you probably don't).
I ran DB's on the instances using SQL Server for years, for a few low-traffic sites, and had no problems. I finally moved the last of these off of my EC2 instances and into RDS and wish I had done in years ago.
For a small, low-traffic site, you can get away with it, but as traffic picks up on your site, and you want to add the ability to autoscale your front-end, keeping the database on the instance is no longer an option. When you have upto 5-10-20 EC2 web instances balancing web traffic, and you want to add or remove instances dynamically to conserve resource (i.e. money), you'll be really happy the database is not on the single instance.
Besides that the automatic backups, the ability to restore to point-in-time, and they ability to take an RDS snapshot, and spin up a new RDS instance for development or testing purposes is really convenient.
Ultimately, everything that RDS does for you, you could do for yourselve using a fleet of EC2 instances, and a lot of time and money, but like I said, if you don't have the time, money or expertise (or the compelling reason) to set that redundancy up youself, then why bother.
I don't understand the use for AWS EC2 and RDS as separate services.
Is an EC2 instance a necessary prerequisite of launching an RDS instance? Can you have a database on your EC2 instance?
RDS is a database-as-a-service; you don't know or care what it is running on, because you don't install it, manage it or perform any of the maintenance on the box it runs on (i.e. software updates). AWS takes care of all of that for you and simply charges you by the hour for using the service.
You can install SQL Server or MySQL (or any other database) on your own EC2 instance, but now its your responsibility to administer. Both are valid uses cases, but in general, for small databases, and especially for test and dev databases, I install SQL Server on my own EC2 instances and manage it myself to have flexibility and save money.
For larger, more critical and production databases, RDS is often a better choice - at a higher cost. The best scenario for you will depend on a lot of things (your budget, your skills, the need for high availability etc).
You can install any databases on ec2 instance (whatever in windows or Linux). ec2 is a standalone virtual server with your fully control
But RDS service, you needn't care of the detail on how to install the database, set the environment, upgrade the version, backup/restore, multi-AZ setup, and so on, AWS RDS Service will take care all of them. Get it ready and you can immediately connect it and start your work. The way to provide RDS services are very similar as service elasticache (memcached & redis)
There is no require for you to launch a new ec2 instance for RDS service setup.
Don't mix ec2 and RDS. They are separate services.
Another way to make you understand this question is,
Amazon RDS is a Software as a Service (SaaS) that provides a full featured relational database service