Monitoring business continuity using Azure Advisor and Azure Monitor in MySQL – Flexible Server
In the era of digital transformation, businesses cannot afford downtime or data loss. High availability is crucial for maintaining business continuity and ensuring that applications are always accessible to users. Azure Database for MySQL – Flexible Server is designed with high availability (HA) as a fundamental feature, providing robust solutions to keep your databases operational even in the face of unexpected failures, but how do you ensure you’re getting the most out of it? This blog post delves into some of the effective monitoring and alerting mechanisms that are crucial for maintaining high availability.
High Availability in Azure Database for MySQL – Flexible Server
High Availability (HA) in Azure Database for MySQL – Flexible Server is designed to ensure uninterrupted database operation, even in the event of hardware or infrastructure failures in the availability zone. When high availability is configured, the flexible server automatically provisions and manages a standby replica in an alternate zone. The data and log files are hosted in zone-redundant storage (ZRS). The standby server reads and replay the log files continuously from the primary server’s storage account, which is protected by storage-level replication. If there’s a failover:
The standby replica is activated.
The binary log files of the primary server continue to apply to the standby server to bring it online to the last committed transaction on the primary.
With a Zone-redundant HA architecture, the guaranteed SLA is 99.99% of uptime and failover time is typically between 60-120 seconds.
Factors that impact High Availability
Lack of primary keys on tables – Azure Database for MySQL – Flexible Server allows configuring high availability with automatic failover. If there is a failure detected in primary, the standby replica in a HA configuration takes over the role of the primary to ensure business continuity. The failover time is typically between 60-120 seconds but in the absence of primary keys the failover time may get adversely affected. Azure Database for MySQL – Flexible Server leverages logical MySQL replication to replicate changes to the standby server. Absence of primary keys, increases the overhead on replication process, potentially causing replication lag or delays in applying changes on the standby server, thereby impacting the failover time or sometimes even resulting HA functionality to get impaired.
Storage IOPS – Storage IOPS have a significant impact on failover time in high availability mode in Azure Database for MySQL – Flexible Server. High IOPS contribute to faster data synchronization between the primary and standby servers, reduce transaction processing time, and ensure that the system can handle the increased I/O load during failover. If you have pre-provisioned IOPS and if it reaches its threshold value, it can adversely impact the replication lag and failover time. It is ideally recommended to switch to Auto scale of IOPS configuration for an optimized failover time in a HA configuration. You can learn more about Auto scale of IOPS here.
What is Azure Advisor?
Azure Advisor is a free, personalized cloud consultant service provided by Microsoft Azure. It analyses your Azure resources and usage telemetry to provide recommendations that help you improve the cost, security, performance, reliability, and operational efficiency of your cloud environment. By leveraging these insights, you can make data-driven decisions to enhance your Azure Database for MySQL – Flexible Server.
Leveraging Azure Advisor Alerts for High Availability
Azure Advisor monitors your MySQL – Flexible Server configurations and usage patterns. It identifies potential risks and provides alerts to help you address them before they impact your database availability.
You can access Advisors via the Azure portal by navigating to Settings-> Advisor recommendations.
Actionable Recommendations
Each alert from Azure Advisor comes with detailed recommendations on how to resolve the identified issues. These recommendations are customized to your specific environment, ensuring that they are relevant and actionable. For high availability, recommendations might include an Advisor highlighting:
The lack of primary key on the table.
High IO usage.
An example of an active advisor notification appearing in Azure portal is shown in the following screenshot:
Each advisor notification comes with a recommended action for the end user. Acting on these recommendations ensures a healthy HA configuration.
Automated Alerts and Notifications
It is always conceivable that advisor recommendations might go unnoticed, resulting in a lack of prompt action to the recommendations shared as part of the advisor notification. Therefore, Azure Advisor also integrates with Azure Monitor to provide automated alerts and notifications. You can set up alert rules to receive notifications via email, SMS, or through other channels whenever an issue is detected, and Azure advisor notification is triggered. This ensures you are promptly informed of any potential problems affecting high availability, allowing for quick action. To configure alerts on the new advisor recommendations on your Azure resource, follow the detailed steps in the article Create Azure Advisor alerts on new recommendations by using the Azure portal.
A sample alert generated appears in the following screenshot:
Note – You can set up alerts to be notified when you have a new Advisor recommendation on one of your resources. These alerts can notify you through email or text message. They can also be used to integrate with your existing systems through a webhook.
Conclusion
Monitoring the HA health in Azure Database for MySQL – Flexible Server is vital for ensuring continuous availability and enhancing disaster recovery preparedness. By using Azure Advisors and Azure Monitor, you can detect potential issues with your HA configuration beforehand, which ultimately contributes to a more reliable and resilient database environment.
If you have any questions or tips on using Azure Advisor with Azure Database for MySQL – Flexible Server, please share them in the Comments below. Happy monitoring!
Microsoft Tech Community – Latest Blogs –Read More