Which of the following best describes the primary role of a message broker like Kafka or RabbitMQ in a microservices architecture?
Think about how services talk to each other without waiting for immediate replies.
Message brokers enable services to send messages asynchronously, decoupling the sender and receiver. This improves scalability and fault tolerance.
You need to design a system that processes a high volume of streaming data with strict ordering guarantees. Which message broker is more suitable and why?
Consider which broker is designed for streaming large volumes of ordered data efficiently.
Kafka is designed for high-throughput, ordered event streaming with durable storage, making it ideal for streaming data pipelines.
Which approach best ensures high availability and fault tolerance in a Kafka cluster?
Think about how Kafka keeps copies of data to survive broker failures.
Kafka achieves high availability by replicating partitions across multiple brokers. If one broker fails, replicas serve the data.
RabbitMQ uses a push model to deliver messages to consumers, while Kafka uses a pull model. What is a key tradeoff of the pull model used by Kafka?
Consider how consumers manage message flow and avoid being overwhelmed.
Kafka's pull model lets consumers fetch messages at their own pace, enabling better handling of slow consumers and backpressure.
You expect to handle 30,000 messages per second, each 1 KB in size, with a replication factor of 3 and retention of 7 days. Approximately how much storage capacity (in TB) should your Kafka cluster have to store all replicas?
Calculate total data per day, multiply by retention days and replication factor, then convert to TB.
30,000 messages/sec × 1 KB = 30 MB/sec (≈0.03 GB/sec). Per day: 0.03 GB/sec × 86,400 sec ≈ 2.6 TB raw data. With replication factor 3: 2.6 × 3 ≈ 7.8 TB/day. For 7 days retention: 7.8 × 7 ≈ 54 TB total storage for all replicas.