0
0
Kafkadevops~20 mins

Standalone vs distributed mode in Kafka - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Kafka Mode Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
Output of Kafka standalone mode configuration
Consider a Kafka setup running in standalone mode with a single broker. What will be the output of the following command that lists topics?
Kafka
kafka-topics.sh --list --bootstrap-server localhost:9092
AError: Could not connect to server
BNo topics found
CList of all topics created on the single broker
DList of topics from all brokers in the cluster
Attempts:
2 left
💡 Hint
In standalone mode, there is only one broker managing all topics.
🧠 Conceptual
intermediate
2:00remaining
Difference in fault tolerance between standalone and distributed mode
Which statement correctly describes the fault tolerance difference between Kafka's standalone and distributed modes?
ADistributed mode allows replication of partitions across brokers for fault tolerance
BStandalone mode provides automatic failover using multiple brokers
CStandalone mode replicates data across multiple machines
DDistributed mode runs only one broker, so no fault tolerance
Attempts:
2 left
💡 Hint
Think about how Kafka handles data safety in a cluster.
🔧 Debug
advanced
2:00remaining
Identify the error in distributed mode broker configuration
Given this broker configuration snippet for distributed mode, what error will occur? broker.id=0 listeners=PLAINTEXT://:9092 log.dirs=/tmp/kafka-logs zookeeper.connect=localhost:2181 Options:
AZookeeper connection error due to wrong port
BKafka broker starts normally and joins the cluster
CSyntax error in configuration file
DKafka broker fails to start due to missing advertised.listeners
Attempts:
2 left
💡 Hint
In distributed mode, brokers must advertise their address to clients and other brokers.
📝 Syntax
advanced
2:00remaining
Syntax error in standalone mode startup command
Which option shows the correct syntax to start Kafka in standalone mode using the command line?
Akafka-server-start.sh -daemon config/server.properties
Bkafka-server-start.sh --config config/server.properties
Ckafka-server-start.sh config/server.properties
Dkafka-server-start.sh config/server.properties --standalone
Attempts:
2 left
💡 Hint
The -daemon flag runs Kafka in the background.
🚀 Application
expert
3:00remaining
Choosing mode for a fault-tolerant Kafka deployment
You need to deploy Kafka for a critical application requiring high availability and fault tolerance. Which mode should you choose and why?
AStandalone mode, because it is simpler and faster to set up
BDistributed mode, because it supports partition replication and failover
CStandalone mode, because it uses less memory and CPU
DDistributed mode, because it runs on a single machine with multiple brokers
Attempts:
2 left
💡 Hint
Consider how Kafka handles failures and data safety.