Maintenance Windows in the Cloud
source link: https://www.tuicool.com/articles/hit/ZfiURrJ
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Recently, I’ve been working with a customer to evaluate the different cloud solutions for MySQL. In this post I am going to focus on maintenance windows and requirements, and what the different cloud platforms offer.
Why is this important at all?
Maintenance windows are required so that the cloud provider can do the necessary updates, patches, and changes to our setup. But there are many questions like:
- Is this going to impact our production traffic?
- Is this going to cause any downtime?
- How long does it take?
- Any way to avoid it?
Let’s discuss the three most popular cloud provider: AWS, Google, Microsoft. These three each have a MySQL based database service where we can compare the maintenance settings.
AWS
When you create an instance you can define your maintenance window. It’s a 30 minutes block when AWS can update and restart your instances, but it might take more time, AWS does not guarantee the update will be done in 30 minutes. The are two different type of updates, Required and Available.
If you defer a required update, you receive a notice from Amazon RDS indicating when the update will be performed. Other updates are marked as available , and these you can defer indefinitely.
It is even possible to disable auto upgrade for minor versions, and in that case you can decide when do you want to do the maintenance.
AWS separate OS updates and database engine updates.
OS Updates
It requires some downtime, but you can minimise it by using Multi-AZ deployments. First, the secondary instance will be updated. Then AWS do a failover and update the Primary instance as well. This means some small outage during the failover.
DB Engine Updates
For DB maintenance, the updates are applied to both instances (primary and secondary) at the same time. That will cause some downtime.
More information: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#USER_UpgradeDBInstance.Maintenance.Multi-AZ
Google CloudSQL
With CloudSQL you have to define an hour for a maintenance window, for example 01:00–02:00, and in that hour, they can restart the instances at any time. It is not guaranteed the update will be done in that hour. The primary and the secondary have the same maintenance window. The read replicas do not have any maintenance window, they can be stopped at any time.
CloudSQL does not differentiate between OS or DB engine, or between required and available upgrades. Because the failover replica has the same maintenance window, any upgrade might cause database outage in that time frame.
More information: https://cloud.google.com/sql/docs/mysql/instance-settings
Microsoft Azure
Azure provides a service called Azure Database for MySQL servers. I was reading the documentation and doing some research trying to find anything regarding the maintenance window, but I did not find anything.
I span up an instance in Azure to see if there is any available settings, but I did not find anything so at this point I do not know how Azure does OS or DB maintenance or how that impacts production traffic.
If someone knows where can I find this information in the documentation, please let me know.
Conclusion
AWS CloudSQL Azure Maintenance Window 30m 1h Unknown Maintenance Window for Read Replicas No No Unknown Separate OS and DB updates Yes No Unknown Outage during update Possible Possible Unknown Postpone an update Possible No Unknown Different priority for updates Yes No UnknownWhile I do not intend to prefer or promote any of the providers, for this specific question, AWS offers the most options and controls for how we want to deal with maintenance.
—
Photo by Caitlin Oriel on Unsplash
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK