简体   繁体   中英

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(eg 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 eg invoke lambda automatically for every backup, or if something fails.
  • Easier integration with other services, eg 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM