Bird
Raised Fist0
RabbitMQdevops~20 mins

Cluster node types (disc, RAM) in RabbitMQ - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
RabbitMQ Cluster Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Difference between disc and RAM nodes in RabbitMQ cluster
Which statement correctly describes the difference between disc nodes and RAM nodes in a RabbitMQ cluster?
ADisc nodes store the queue and message data on disk, while RAM nodes keep this data only in memory.
BRAM nodes store all data on disk, while disc nodes keep data only in memory.
CDisc nodes and RAM nodes both store data only in memory but differ in CPU usage.
DRAM nodes replicate data to disc nodes but do not store any data themselves.
Attempts:
2 left
💡 Hint
Think about where the message data is saved permanently.
💻 Command Output
intermediate
2:00remaining
Output of rabbitmqctl cluster_status with mixed node types
Given a RabbitMQ cluster with two disc nodes and one RAM node, what will the 'rabbitmqctl cluster_status' command output show under 'disc' and 'ram' nodes?
RabbitMQ
rabbitmqctl cluster_status
Adisc nodes: [rabbit@node1, rabbit@node2], ram nodes: [rabbit@node3]
Bdisc nodes: [rabbit@node3], ram nodes: [rabbit@node1, rabbit@node2]
Cdisc nodes: [rabbit@node1], ram nodes: [rabbit@node2, rabbit@node3]
Ddisc nodes: [], ram nodes: [rabbit@node1, rabbit@node2, rabbit@node3]
Attempts:
2 left
💡 Hint
Disc nodes are usually the main persistent nodes.
🔀 Workflow
advanced
3:00remaining
Adding a RAM node to an existing RabbitMQ cluster
Which sequence of commands correctly adds a RAM node named 'rabbit@node3' to an existing cluster with disc nodes 'rabbit@node1' and 'rabbit@node2'?
A1,2,4,3
B2,1,3,4
C1,3,2,4
D1,2,3,4
Attempts:
2 left
💡 Hint
You must stop the app before joining the cluster.
❓ Troubleshoot
advanced
2:00remaining
Troubleshooting node type mismatch error
You try to join a RAM node to a cluster but get an error about node type mismatch. What is the most likely cause?
AThe cluster has no disc nodes running.
BThe node was previously a disc node and still has disc node data.
CThe RAM node has insufficient memory to join the cluster.
DThe node hostname does not match the cluster hostname.
Attempts:
2 left
💡 Hint
Think about leftover data from previous node roles.
✅ Best Practice
expert
3:00remaining
Choosing node types for a highly available RabbitMQ cluster
For a RabbitMQ cluster that must remain highly available and preserve messages during node restarts, which node type configuration is best?
AOne disc node and multiple RAM nodes to balance persistence and speed.
BAll nodes as RAM nodes for faster performance.
CAll nodes as disc nodes to ensure message persistence.
DOnly RAM nodes with external storage for message persistence.
Attempts:
2 left
💡 Hint
Persistence is key for message safety during restarts.

Practice

(1/5)
1. What is the main difference between a disc node and a RAM node in a RabbitMQ cluster?
easy
A. RAM nodes save data on disk, disc nodes keep data only in memory.
B. Disc nodes are faster than RAM nodes.
C. Disc nodes save data on disk, RAM nodes keep data only in memory.
D. RAM nodes cannot join a RabbitMQ cluster.

Solution

  1. Step 1: Understand node types in RabbitMQ

    Disc nodes persist data on disk for safety, RAM nodes store data in memory for speed but less durability.
  2. Step 2: Compare data storage methods

    Disc nodes write to disk, RAM nodes do not, making disc nodes safer but slower.
  3. Final Answer:

    Disc nodes save data on disk, RAM nodes keep data only in memory. -> Option C
  4. Quick Check:

    Disc = disk, RAM = memory [OK]
Hint: Disc nodes store on disk; RAM nodes store in memory [OK]
Common Mistakes:
  • Confusing which node type stores data on disk
  • Thinking RAM nodes are faster and safer
  • Believing RAM nodes cannot join clusters
2. Which command correctly adds a new RAM node named rabbit@node2 to an existing RabbitMQ cluster?
easy
A. rabbitmqctl join_cluster --ram rabbit@node1
B. rabbitmqctl join_cluster rabbit@node1
C. rabbitmqctl join_cluster rabbit@node1 --ram
D. rabbitmqctl join_cluster --disc rabbit@node1

Solution

  1. Step 1: Recall syntax for joining a RAM node

    The --ram option must come before the cluster node name in the command.
  2. Step 2: Identify correct command structure

    Correct command is rabbitmqctl join_cluster --ram rabbit@node1 to join as RAM node.
  3. Final Answer:

    rabbitmqctl join_cluster --ram rabbit@node1 -> Option A
  4. Quick Check:

    --ram before node name = correct syntax [OK]
Hint: Use --ram before node name to join as RAM node [OK]
Common Mistakes:
  • Placing --ram after the node name
  • Omitting --ram option for RAM nodes
  • Using --disc option for RAM nodes
3. Given a RabbitMQ cluster with one disc node and one RAM node, what happens if the disc node goes down?
medium
A. The cluster continues working normally with no data loss.
B. The cluster loses all data because RAM nodes do not persist data.
C. The RAM node automatically converts to a disc node.
D. The RAM node takes over and data is safe on disk.

Solution

  1. Step 1: Understand data persistence roles

    Disc nodes save data on disk; RAM nodes keep data only in memory and lose it if disc node fails.
  2. Step 2: Analyze cluster behavior on disc node failure

    Without the disc node, data is lost because RAM nodes do not persist data.
  3. Final Answer:

    The cluster loses all data because RAM nodes do not persist data. -> Option B
  4. Quick Check:

    Disc node failure = data loss if only RAM node left [OK]
Hint: RAM nodes lose data if disc node fails [OK]
Common Mistakes:
  • Assuming RAM nodes save data on disk
  • Thinking RAM nodes convert automatically
  • Believing cluster works normally without disc node
4. You tried to add a RAM node with the command rabbitmqctl join_cluster rabbit@node1 --ram but it failed. What is the likely cause?
medium
A. You must stop the RabbitMQ service before joining.
B. The node name is incorrect.
C. RAM nodes cannot join clusters.
D. The --ram option must come before the node name.

Solution

  1. Step 1: Check command syntax for joining RAM node

    The --ram option must be placed before the node name in the command.
  2. Step 2: Identify error cause

    Placing --ram after the node name causes the command to fail.
  3. Final Answer:

    The --ram option must come before the node name. -> Option D
  4. Quick Check:

    Correct option order fixes join_cluster command [OK]
Hint: Put --ram before node name to avoid syntax errors [OK]
Common Mistakes:
  • Placing --ram after node name
  • Assuming RAM nodes cannot join clusters
  • Stopping service unnecessarily
5. You have a RabbitMQ cluster with 2 disc nodes and 2 RAM nodes. You want to ensure data safety if one disc node fails. Which setup is best?
hard
A. Ensure disc nodes replicate data and RAM nodes join with --ram option.
B. Use only RAM nodes for speed and ignore disc nodes.
C. Convert all RAM nodes to disc nodes using --disc option.
D. Remove disc nodes and rely on RAM nodes with backups.

Solution

  1. Step 1: Understand cluster node roles for safety

    Disc nodes persist data and replicate it for safety; RAM nodes improve speed but do not persist data.
  2. Step 2: Choose best setup for data safety and performance

    Keep disc nodes replicating data and add RAM nodes with --ram for speed without losing safety.
  3. Final Answer:

    Ensure disc nodes replicate data and RAM nodes join with --ram option. -> Option A
  4. Quick Check:

    Disc nodes for safety + RAM nodes for speed = best practice [OK]
Hint: Keep disc nodes for safety; add RAM nodes for speed [OK]
Common Mistakes:
  • Using only RAM nodes ignoring data safety
  • Converting RAM nodes to disc nodes unnecessarily
  • Removing disc nodes risking data loss
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard