Non-Relational Database Automatic Failover via Machine Learning Prediction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing database replication systems face challenges in automatic failover when there are only two regions, as they lack sufficient votes to elect a new primary node, requiring manual intervention and breaking the autonomy of the system.
Innovation Solution
Implementing a machine learning model trained on historical failover data to predict the likelihood of a failover state and automatically designate a secondary region as the primary, using a lambda function to influence voting and ensure seamless failover, even in scenarios where manual intervention is needed.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Extent of automation
If a traditional majority election system is used for automatic failover, then the system can elect a new primary node, but the system fails when there are only two regions because insufficient votes are available to elect a new primary
Solution Approach 1:
The system performs preliminary actions by monitoring health characteristics of the primary region and predicting potential failover events before they occur. The machine learning model analyzes historical data and current conditions to anticipate failures, allowing the system to prepare for failover scenarios and maintain automation even with limited regional configurations.
Solution Approach 2:
The system enables self-service failover by using machine learning models to automatically determine when and how to perform failover without human intervention. The model processes health characteristics, predicts failover likelihood, and executes the failover process autonomously, allowing the system to manage its own reliability even in edge cases with only two regions.
2Device complexity
If manual intervention is required for failover in two-region configurations, then the system can maintain simplicity, but system autonomy is broken and downtime increases
Solution Approach 1:
The machine learning model enables the system to perform self-service by automatically monitoring its own health characteristics, predicting potential failures, and executing failover without human intervention. This maintains system autonomy while keeping the configuration simple, as the model handles complex decision-making internally.
Solution Approach 2:
The system implements feedback mechanisms by continuously monitoring health characteristics of the primary region and using this information to update the machine learning model's predictions. This feedback loop allows the system to adapt to changing conditions and make autonomous failover decisions based on real-time data, maintaining both simplicity and autonomy.
3Reliability
If the system monitors multiple health characteristics to improve prediction accuracy, then failover reliability improves, but the complexity of the monitoring and prediction system increases
Solution Approach 1:
The machine learning model serves multiple functions simultaneously: it monitors health characteristics, predicts failover likelihood, and determines appropriate actions. This multi-functionality consolidates what would otherwise be separate complex systems into a single unified model, improving prediction accuracy without proportionally increasing overall system complexity.
Solution Approach 2:
The system manages complexity by dynamically adjusting which health characteristics are monitored and weighted based on the current state and prediction needs. The machine learning model can focus on different parameters depending on the situation, allowing high prediction accuracy without requiring all possible monitoring parameters to be active simultaneously.
Data Source
AI summary
Disclosed embodiments pertain to automatic failover for non-relational databases. A machine learning model can be generated and trained with historical failover data. The historical failover data can be related to previous primary node failures or previous region failures of a plurality of non-relational databases. A non-relational database may be monitored for real-time or near-real-time data. The data can be input into the machine learning model to predict the likelihood that a primary region is in a failure state. A new primary node can be designated automatically when the likelihood satisfies a predetermined threshold. Data services are thus automatically transferred from a primary node in the failing region to a new primary node in a non-failing region.


