readyforhires

Advanced Apache Kafka test (Advanced)

40 questions · 40 minutes · Free

Exactly-once, Kafka Streams, cluster tuning and running Kafka at scale.

Take the Advanced Apache Kafka test

What it covers

Interview format

Earn a certificate

The Advanced Apache Kafka test is one of the 8 tests of the Backend Developer: Advanced learning path. Pass it and the other 7 tests at 70% or more and readyforhires issues you a verifiable certificate in your name, with its own code and verify link to share or add to LinkedIn.

Sample learning path certificate for Backend Developer: Advanced, made out to “Your name” and marked SAMPLE
Pass with 70% or more to earn a verifiable certificate. This is a sample: yours carries your name, the date you earned it and its own verify code.

Sample questions

5 sample questions from the Advanced Apache Kafka test, with the answers. Samples are taken out of the live test, so you will not meet these when you sit it.

  1. Which of the following accurately describes how ksqlDB and Kafka Streams handle schema enforcement?

    1. Neither ksqlDB nor Kafka Streams enforces schema enforcement; it is entirely up to the application developer.
    2. ksqlDB does not enforce schema enforcement, while Kafka Streams enforces schema enforcement using the Schema Registry.
    3. Both ksqlDB and Kafka Streams enforce schema enforcement using the Schema Registry.
    4. ksqlDB enforces schema enforcement using the Schema Registry, whereas Kafka Streams does not enforce schema enforcement by default and relies on the application to validate schemas.

    Answer: D. ksqlDB enforces schema enforcement using the Schema Registry, whereas Kafka Streams does not enforce schema enforcement by default and relies on the application to validate schemas.

    ksqlDB integrates with the Schema Registry to enforce schema enforcement, ensuring that all data written to a stream or table adheres to the defined schema. Kafka Streams, on the other hand, does not enforce schema by default and places the responsibility of schema validation on the application developer. This makes ksqlDB a better choice for scenarios where schema enforcement is critical, while Kafka Streams offers more flexibility in schema handling.

  2. Which isolation level must consumers use to ensure they skip aborted transaction records and read only up to the last stable offset (LSO) in Apache Kafka?

    1. read_uncommitted
    2. read_committed
    3. write_committed
    4. read_only

    Answer: B. read_committed

    Consumers must use the `read_committed` isolation level to skip aborted transaction records and read only up to the last stable offset (LSO). The default isolation level is `read_uncommitted`, which allows consumers to read aborted records.

  3. A Kafka cluster is experiencing write failures with the error 'NotEnoughReplicas' even though there are three replicas for each partition. What is the most likely cause of this issue?

    1. The ISR (In-Sync Replicas) count is less than the min.insync.replicas configuration value, which is set to 2.
    2. The replica.lag.time.max.ms is set to a very high value, allowing replicas to fall out of sync for longer periods.
    3. The unclean.leader.election.enable is set to true, allowing out-of-sync replicas to become leaders.
    4. The producer's batch.size is set too low, causing frequent flushes and reduced throughput.

    Answer: A. The ISR (In-Sync Replicas) count is less than the min.insync.replicas configuration value, which is set to 2.

    When the ISR count is less than the min.insync.replicas configuration value, it indicates that the number of replicas that are in sync is below the threshold required for writes to be considered durable. This can lead to write failures and should be resolved by ensuring that enough replicas are in sync, which can be achieved by increasing the ISR count or adjusting the min.insync.replicas value.

  4. Which of the following statements accurately describes the impact of increasing the socket buffer size on a Kafka broker?

    1. Increasing the socket buffer size on the broker can reduce the number of TCP packets required to transfer data, thereby improving throughput and reducing latency.
    2. Socket buffer tuning has no impact on Kafka performance and is purely a network configuration parameter.
    3. Reducing the socket buffer size improves performance by minimizing memory usage on the broker.
    4. Socket buffer tuning primarily affects the performance of consumer clients, not the broker.

    Answer: A. Increasing the socket buffer size on the broker can reduce the number of TCP packets required to transfer data, thereby improving throughput and reducing latency.

    Broker socket buffer tuning is a critical aspect of Kafka performance optimization. Increasing the socket buffer size allows the broker to handle larger data transfers more efficiently, reducing the overhead of frequent TCP packet transmissions. This directly impacts throughput and latency, making it a key consideration for performance tuning. Other options are either incorrect or unrelated to the specific impact of socket buffer tuning.

  5. Which of the following is directly involved in the calculation of consumer lag in Apache Kafka?

    1. ksqlDB UDF integration
    2. Consumer lag checkpointing
    3. ISR leader election
    4. Log compaction triggers

    Answer: B. Consumer lag checkpointing

    Consumer lag is calculated based on the difference between the latest offset in the Kafka topic and the offset that the consumer has processed. Checkpointing refers to the process of recording the consumer's current offset, which is essential for accurately calculating consumer lag. The other options do not directly relate to the method of calculating consumer lag.

Frequently asked questions

How many questions are in the Advanced Apache Kafka test?
40 questions (24 multiple choice, 12 multi-answer, 4 predict-the-output), with 40 minutes to answer them.
What does the Advanced Apache Kafka test cover?
Exactly-once and transactions, Kafka Streams and ksqlDB, Cluster tuning and ISR, Monitoring consumer lag, Multi-cluster replication.
Is the Advanced Apache Kafka test free?
Yes. It is free to take with a readyforhires account.
What level is the Advanced Apache Kafka test?
Advanced, in Backend.

More Backend tests

Roles that test these skills

Companies that test these skills

All practice tests · All Backend tests

Last updated