Standalone mode runs Kafka on a single machine where all components (broker, zookeeper) run together. It is simple and used for development or testing.
Click to reveal answer
beginner
What is distributed mode in Kafka?
Distributed mode runs Kafka across multiple machines. Brokers and Zookeeper run separately to provide fault tolerance and scalability.
Click to reveal answer
intermediate
Why use distributed mode instead of standalone mode?
Distributed mode allows Kafka to handle more data, stay available if some machines fail, and scale by adding more servers.
Click to reveal answer
beginner
Name one limitation of standalone mode.
Standalone mode cannot handle large workloads or provide fault tolerance because it runs on a single machine.
Click to reveal answer
intermediate
How does Kafka ensure reliability in distributed mode?
Kafka replicates data across multiple brokers and uses Zookeeper to manage cluster state, so if one broker fails, others keep working.
Click to reveal answer
What does Kafka run in standalone mode?
AOnly brokers on multiple machines
BMultiple brokers on different machines
COnly Zookeeper on one machine
DAll components on one machine
✗ Incorrect
Standalone mode runs all Kafka components on a single machine.
Which mode provides fault tolerance in Kafka?
ANeither mode
BStandalone mode
CDistributed mode
DBoth modes
✗ Incorrect
Distributed mode replicates data and runs on multiple machines to provide fault tolerance.
Why is standalone mode mainly used?
AFor production with high traffic
BFor development and testing
CFor distributed computing
DFor cloud deployment
✗ Incorrect
Standalone mode is simple and used mainly for development or testing.
What role does Zookeeper play in distributed mode?
AManages cluster state and coordination
BStores all Kafka messages
CRuns the Kafka producer
DManages client connections
✗ Incorrect
Zookeeper manages cluster state and helps coordinate brokers in distributed mode.
Which is a key benefit of distributed mode?
AScalability and fault tolerance
BNo need for replication
CRuns on a single machine
DSimpler setup
✗ Incorrect
Distributed mode allows Kafka to scale and stay available even if some machines fail.
Explain the difference between standalone and distributed mode in Kafka.
Think about how many machines run Kafka components and what benefits that brings.
You got /4 concepts.
Why is distributed mode preferred for production Kafka deployments?
Consider what happens if one machine fails in production.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of running Kafka Connect in standalone mode?
easy
A. To run multiple workers for high scalability
B. To run Kafka Connect in a single process for simple or testing use
C. To enable fault tolerance across multiple machines
D. To connect Kafka with distributed databases automatically
Solution
Step 1: Understand standalone mode context
Standalone mode runs Kafka Connect in one process, suitable for simple or testing scenarios.
Step 2: Compare with distributed mode
Distributed mode runs multiple workers for scalability and fault tolerance, unlike standalone mode.
Final Answer:
To run Kafka Connect in a single process for simple or testing use -> Option B
Quick Check:
Standalone mode = single process for testing [OK]
Hint: Standalone = single process, simple use [OK]
Common Mistakes:
Confusing standalone with distributed mode
Thinking standalone supports fault tolerance
Assuming standalone is for large scale pipelines
2. Which of the following is the correct command to start Kafka Connect in distributed mode?
easy
A. kafka-connect.sh start-standalone
B. connect-standalone.sh config/connect-standalone.properties
C. kafka-connect.sh start-distributed
D. connect-distributed.sh config/connect-distributed.properties
Solution
Step 1: Identify the script for distributed mode
The script connect-distributed.sh is used to start Kafka Connect in distributed mode.
Step 2: Confirm the configuration file
The configuration file config/connect-distributed.properties is the standard config for distributed mode.
Final Answer:
connect-distributed.sh config/connect-distributed.properties -> Option D
Standalone mode runs in a single process without fault tolerance or automatic recovery.
Step 2: Consequence of process crash
If the process crashes, connectors stop and need manual restart because no other worker is available.
Final Answer:
The connectors will stop and require manual restart -> Option C
Quick Check:
Standalone mode lacks automatic recovery [OK]
Hint: Standalone mode needs manual restart after crash [OK]
Common Mistakes:
Assuming automatic failover in standalone mode
Thinking distributed mode starts automatically
Believing connectors run independently of the process
4. You configured Kafka Connect in distributed mode but notice that only one worker is running and no failover happens. What is the likely cause?
medium
A. You started Kafka Connect with connect-standalone.sh instead of connect-distributed.sh
B. You did not configure the Kafka cluster correctly
C. You forgot to add connectors to the worker
D. Distributed mode does not support multiple workers
Solution
Step 1: Check the startup script used
If connect-standalone.sh is used, only one worker runs without failover, even if config is for distributed mode.
Step 2: Understand distributed mode requirements
Distributed mode requires starting with connect-distributed.sh to run multiple workers and enable failover.
Final Answer:
You started Kafka Connect with connect-standalone.sh instead of connect-distributed.sh -> Option A
Quick Check:
Wrong startup script causes single worker [OK]
Hint: Use connect-distributed.sh to run multiple workers [OK]
Common Mistakes:
Assuming config alone enables distributed mode
Believing distributed mode runs with standalone script
Ignoring startup script importance
5. You have a data pipeline that must handle high volume and remain available even if one worker fails. Which Kafka Connect mode should you choose and why?
hard
A. Distributed mode, because it supports multiple workers and fault tolerance
B. Standalone mode, because it is simpler to configure
C. Standalone mode, because it automatically restarts connectors on failure
D. Distributed mode, because it runs connectors in a single process
Solution
Step 1: Analyze pipeline requirements
High volume and availability require scalability and fault tolerance.
Step 2: Match requirements to Kafka Connect modes
Distributed mode runs multiple workers and supports fault tolerance, meeting these needs.
Final Answer:
Distributed mode, because it supports multiple workers and fault tolerance -> Option A
Quick Check:
High volume + fault tolerance = distributed mode [OK]
Hint: Choose distributed mode for scalability and fault tolerance [OK]
Common Mistakes:
Choosing standalone for high availability
Thinking standalone auto-restarts connectors
Misunderstanding distributed mode runs single process
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.