Building High Availability in Memgraph: License Differences
High availability is a critical component for maintaining a resilient database system. Especially for enterprises that require uninterrupted data access and reliability. This post covers how high availability can be set up in Memgraph based on different Memgraph licensing models.
Replication
Replication involves creating and maintaining multiple copies of the data across different nodes in a database cluster. The primary goals of replication are data redundancy, load balancing, backup and recovery.
Types of Replication in Memgraph
-
Synchronous replication (SYNC): Data is copied to replicas in real time. This ensures consistency and partition tolerance. This mode prioritizes data consistency, so it may impact write availability during node failures.
-
Asynchronous replication (ASYNC): Data is copied to replicas with a delay. This mode prioritizes system availability and can more gracefully handle network partitions.
Replication in Memgraph Community Edition
Memgraph's Community edition is a fantastic entry point for anyone looking to get started with Memgraph, as it's not crippleware. It offers many useful features, such as a connector for streams, triggers, and graph algorithms, completely free of charge. One of those features is the ability to create a replication cluster.
In the cluster, a MAIN
instance will replicate the data to REPLICA
instances, but there will be no automatic failover if the MAIN
instance fails. You'll need to manually handle failover scenarios to ensure your data is always reachable. You can script these processes to manage failover situations. You can script these processes to manage failover situations.
Manual Failover Requirements
Implementing manual failover mechanisms using the Community edition will involve some time and effort. You'll need to:
- Develop custom scripts to monitor the health of your nodes and initiate failover when necessary.
- Constantly monitor the system to detect any node failures.
- Intervene manually when a failure occurs to ensure the system continues to function smoothly.
While this is feasible, it can be time-consuming and requires dedicated engineering and DevOps resources to build, test, and maintain these systems.
Feature | Community Edition | Enterprise Edition |
---|---|---|
Replication Types Supported | SYNC, ASYNC | SYNC, ASYNC |
Automatic Failover | No (Manual failover required) | Yes (Built-in automatic failover) |
Commercial Support | No | Yes |
Cost Efficiency | Requires custom failover scripts and manual efforts | Cost-effective with automatic features |
Automatic Failover
High availability automatic failover is a mechanism that ensures the continuous operation of a database system by automatically redirecting requests to a standby node if the primary node fails. The primary goals of automatic failover are to minimize downtime and fault tolerance.
It offers a simple and effective solution for continuous database operation without manual coding.
Automatic Failover in Memgraph Enterprise Edition
Memgraph’s Enterprise edition is the ideal solution for those who need a worry-free, highly available system with automatic failover. The Enterprise version of Memgraph includes built-in automatic failover, ensuring your system remains operational with minimal downtime and manual intervention.
Alongside the automatic failover, high availability will be expanded by several other features that will increase the availability of your solution without additional work on your side:
-
Disaster recovery: Ensures that your database can be restored and continue operating even after a catastrophic failure, such as hardware malfunctions or data center outages. This feature allows you to quickly recover lost data and resume operations with minimal disruption.
-
No-downtime updates: No-downtime updates enable you to apply software patches, updates, or configuration changes to your Memgraph system without interrupting its operation. This ensures that your database remains available and responsive to users while being updated.
-
Multi-region replication: Multi-region replication allows you to replicate your database across different geographic regions, ensuring that your data is available closer to users in various locations. This enhances fault tolerance and reduces latency, as the system can continue to operate smoothly even if one region experiences issues.
Benefits of Memgraph Enterprise Edition
- Automatic failover
- Our system automatically detects node failures and redirects traffic to healthy nodes without manual intervention, ensuring continuous availability.
- Commercial support
- With the Enterprise edition, you gain access to our exceptional support team, ready to assist with any issues.
- Cost efficiency
- Investing in the Enterprise edition can be more cost-effective in the long run compared to building and maintaining your own failover scripts and systems using the Community edition. The time and resources saved on engineering and DevOps efforts can be substantial.
Conclusion
Memgraph's Enterprise edition offers built-in automatic failover, providing high availability with minimal downtime and manual intervention. In contrast, the Community edition requires manual failover, demanding more effort and resources. The Enterprise edition is optimal for enterprises needing continuous availability and commercial support.
You can explore the features with a free 30-day trial of Memgraph Enterprise. Request the trial here!