Ora

How many nodes are recommended for Ceph?

Published in Ceph Node Recommendations 3 mins read

For the foundational components of a Ceph cluster, specifically the Ceph Monitor daemons, a minimum of three nodes is highly recommended to ensure high availability and proper cluster operation.

Understanding Ceph Monitor Node Recommendations

Ceph is a distributed storage system that requires a robust and fault-tolerant control plane. The Ceph Monitor daemons (ceph-mon) are crucial for maintaining the cluster's state, including the cluster map, health, and authentication. To prevent a single point of failure and ensure the cluster can continue operating even if one monitor fails, a quorum of monitors is essential.

Why Three Monitor Nodes?

A minimum of three Ceph Monitor nodes is recommended to establish a quorum. Ceph monitors use a Paxos-based consensus algorithm to maintain consistency across the cluster. For a cluster to maintain quorum, more than half of the monitor nodes must be active and communicating.

  • 1 Monitor: A single point of failure. If it goes down, the cluster loses its state.
  • 2 Monitors: If one fails, only one remains, which is not enough to form a quorum (2/2 = 1, not > 1/2). Two monitors will get into a split-brain scenario.
  • 3 Monitors: If one monitor fails, two monitors remain. Two is greater than half of three (1.5), so a quorum can still be formed, and the cluster remains operational. This configuration tolerates the loss of one monitor node.
  • 5 Monitors: For even greater fault tolerance, tolerating the loss of two monitor nodes, five monitors are often used in larger or more critical deployments.

Minimum Hardware Specifications for Ceph Monitor Nodes

Beyond the node count, specific hardware resources are also recommended for each Ceph Monitor daemon to ensure optimal performance and stability.

Criteria Minimum Recommended Details
Nodes Minimum of 3 nodes Essential for quorum and high availability
RAM 1 GB per daemon For smooth operation of the monitor daemon
Disk Space 10 GB per daemon 50 GB recommended for log and data storage
Monitor Disk 1x SSD disk (optional) Recommended for LevelDB monitor data, improving performance

It's important to note that while 10 GB of disk space is a minimum, 50 GB is often recommended to accommodate potential growth in monitor data and logs, ensuring long-term stability without frequent expansion. The use of an SSD for the monitor disk is highly beneficial as monitor performance heavily relies on fast read/write operations for its LevelDB database.

Holistic View: Other Ceph Nodes

While three nodes are the standard minimum recommendation for Ceph Monitors, a complete Ceph cluster also requires other types of nodes for its full functionality:

  • Object Storage Daemon (OSD) Nodes: These are the workhorses of the cluster, responsible for storing data. The number of OSD nodes depends heavily on the storage capacity and performance requirements of your deployment. Each OSD typically runs on a separate disk, and a single node can host multiple OSDs.
  • Ceph Manager (MGR) Nodes: Ceph Managers complement the Monitors by providing additional monitoring and management capabilities, including the Ceph Dashboard. At least two manager nodes are recommended for high availability.
  • Metadata Server (MDS) Nodes: Required for the Ceph File System (CephFS) to manage file system metadata.
  • Gateway Nodes: For object storage access via S3/Swift APIs (Ceph RGW - RADOS Gateway), dedicated gateway nodes are often deployed.

Therefore, while the minimum for the critical control plane (Monitors) is three nodes, a functional and robust Ceph cluster will typically consist of many more nodes across these various roles, scaled according to specific workload and redundancy needs.