larger size db export from rackspace - mysql

I am planing to migrate my Db from rackspace to AWS. The current db has around 50GB of size.
So how can i export this Db from rackspace without downtime.Or any other solutions like direct migration from rackspace to AWS RDS

Amazon provides multiple options in the RDS docs. Have you read them?
My preference would be to set up replication between your Rackspace instance and a new RDS instance. This will minimize your downtime: when you're ready you shut down your applications, reconfigure them to use the new database, and you're done.
I recommend planning for at least three attempts, since replication can be tricky the first time you set it up. Even if you get the replication right on the first try, I strongly suggest that you bring up a test environment and do a complete regression test of your app, before repeating the replication for your production cutover.

Yes, You can easily achieve migration without any outage using DMS services given by Amazon. I used DMS for migration from Company Hosted Environment to RDS.

Related

mysql - Why do we need RDS when we can use docker image for mysql

From my understanding, Aws RDS facilitate backup for the mysql database, but it is not cheap.
While using docker image for mysql may save us more in terms of cost? Because we only need to download the docker image for dockerhub and directly use it for free(e.g. create an instance and run the container).
Is there another reason of using RDS other than facilitating backup for the database?
I list several features of RDS which may warrant using it over self-managed MySQL docker container on an EC2 insistence or ECS:
RDS is managed service, so all OS updates, MySQL patches are managed by AWS and you don't have to worry about them.
RDS supports storage auto-scaling - you can start with small db, and RDS will extend storage automatically as needed.
Point-in-time recovery allowing you to "rewind" your recent db changes.
Read replicas - you can create up to 5 read replicas of your database to off-load read intensive applications from your primary db instance.
Cross-region read replica - you can have your replica in different region which is good for disaster recovery (entire AWS region goes down)
Automated and manual backups, including backups to a different region.
IAM authentication to your db instead of regular username/password.
Multi-AZ - RDS can keep a stand-by replica of your primary database instance in different availability zone, for quick recovery if it fails.
CloudWatch integrated db metrics and logs.
RDS event notifications allow you for straight-forward development of automations e.g. invoke lambda automatically for every backup, or if something fails.
Easier integration with other services, e.g. use of RDS Proxy in Lambda functions.
All these and other features of RDS make it much more expensive then hosting a self-managed MySQL docker container. But if MySQL in docker container meets all your requirements, then there is no need to use RDS. You can always start with the docker, and if your data and requirements grow, you can migrate to RDS.

AWS RDS MySQL Cross-region replication

I need to create an RDS MySQL instance in us-east-1 and would like to replicate this data in another region (say eu-west-1). I know about read-replicas, and I will be using them also, but I wanted to have a back-up non-read-replica in another region.
Has anyone done this?
Is there code out there that does this replication?
I highly recommend switching from RDS MySQL to RDS Aurora, which is MySQL compatible. You won't have to change anything in your code, the database will still appear to be MySQL to any apps that connect to it. Among the many advantages Aurora has over MySQL is that it supports cross-region replication.
There are several ways to do this. I will cover two easy methods. RDS features are based upon engine (MySQL, Aurora, PostreSQL, etc.). Review as required.
1) Create a read-replica of your existing RDS instance in another region. Then promote that read-replica to master. Now you have a separate instance running in another region. You can then stop this instance to minimize billing (for up to seven days).
2) Create an RDS snapshot. Copy that snapshot to another region. When needed launch a new RDS instance from the snapshot.

MySql migrate to Aurora without taking downtime

I've AWS MySQL RDS instance located at Singapore, and I'm planning to migrate it to AWS Aurora (Mumbai). This process roughly takes about 30-40 minutes. I don't want to take any downtime while migration process. My App server created on node.js and also hosted on EC2 at Singapore. How Do I do HA (High Availability) of my database? What should I need to do? Should I make any changes in my server logic on node.js? or make any replication between 2 databases (MySql & Aurora)? or I need to create load balancer to achieve his?
In sort While migration process, I don't want any downtime and my database serves as usual to my users/client.
I have done both migrations Singapore to Mumbai and MySQL to Aurora. I will recommend to take one step at a time.. Looks like your website is important as you are so particular about zero downtime.. So, take measured risks.
We never know what fails during these big engineering release. Worst part is that MySQL to Aurora is a "No coming back" release as there is no migration from "Aurora to MySQL".
I will recommend that for Aurora to Mysql go through serious testing; because I did faced few issues like opt file missing, tmp database not supported in Aurora.
For Singapore to Mumbai; make sure your application uses an internal dns name like abc.internal which is CNAME to actual endpoint. Best way with minimal downtime is to create replica in Mumbai --> make master as readOnly --> promote replica to master --> now change abc.internal to new endpoint.
Aurora to Mysql there will be downtime depending on your db size. Please remember that some downtime is ok; but you cannot afford to loose any data.

What is the difference between Database Mirroring and Database Replication such as Multi A-Z deployment in Amazon RDS?

I have an application database running with MySQL engine on Amazon RDS. For better availability of our data for users in all parts of the world I'm looking for the best solution.
In the previous version of the application, we mirrored our database in US and Singapore, so that users got a better performance in terms of speed and on our side, we had backup if any disaster occurred.
Now as we moved to Amazon, will having Multi A-Z Deployment serve us in the same way? I mean replicates the database in all regions but will RDS still work in a single region only?
I have done some studies but still not sure so please ask me any further questions if I'm being puzzling.
Thank you.
I think you need both the Multi-AZ and the Read Replica features of AWS RDS.
Multi-AZ just creates a non-accessible secondary DB in another availability zone and in case the primary fails, AWS would switch over to the secondary DB. So you have failover.
In the case you want to increase the performance, and your application can work in read-only mode in Singapore (for example), the Read Replica would be perfect. If writes are also required, you would need to route them to the primary read-write database.
AWS supports a combination of the two approaches.
RDS MySQL Multi-AZ deployments currently works only inside an Amazon EC2 region. RDS Read replica's also need to be present inside the same Amazon EC2 region. Inter region replication is the most requested feature in AWS RDS to replicate data to another RDS in Alternative Amazon EC2 region. It is in their road map currently.

Architecture of MySQL on EBS for scaling (Amazon Web Services)

I'm trying to understand how to architect an Amazon Web Services application.
I have an instance running off of EBS. As far as I understand, I need to mount the EBS drive so that I can store my MySQL database on it.
When I later want to scale up, how do I do so? I understand that I can add more server instances, but how will they be accessing the database? Since from what I understand, the EBS volume can only be attached to one server instance.
I can't speak to this particular setup as I do not have experience using EBS with a MySQL instance but how this type of scaling is typically accomplished is by dedicating a particular instance as the master database server. Any time you spin up additional web servers those are still using the master DB IP to connect. At the time in which your database is the bottleneck you then spin up a slave DB instance on one of the boxes (or its own dedicated box). You can then configure replication in either a master to slave direction or a circular replication so that you can write to the slave instance as well.
If you choose the classic master to slave replication then you will have to make sure your writes are only performed on the master DB instance.
You can setup something like Zeus or any other connection load balancer so that you only ever have to connect to a single Database IP which will then round-robin route your read connections to your pool of servers. Otherwise you'd have to manage the connections yourself which is definitely not trivial. Good luck.
Growing Amazon EBS Volume sizes
You can give a try to MySQL clustering on your EBS backed instances. I have similar query, with more requirements, posted here.
EBS Volumes capacity can be scaled up using Snapshot->launch new volume technique, alternatively storage capacity can be scaled out using EBS Striping (RAID 0).
In AWS you cannot mount same EBS Volume to 2 EC2 instances simultaneously, so when you are scaling your application you need to scale out / up your MySQL DB either thru Replication or clustering. AWS RDS is a very good option for MySQL , if your application is read intensive then you can scale out using RDS Read replica's as well. If you need write scaling then functional partition or MySQL Shards can be explored.
AWS has an entire product dedicated to this: RDS.
In all but the rarest and most specialized of circumstances you're going to be better off using RDS than trying to create and tune your own EBS/EC2/MySQL infrastructure.
RDS also directly answers your question - they directly enable the creation of readonly databases to use as query slaves. RDS also performs backups, upgrades, and all sorts of fail-over infrastructure for you.
With EBS there's no way to attach a disk to multiple EC2 instances, so you're not going to be able to build out a failure cluster using that approach. Instead you're going to need replication or backup tools of some type.