WebSocket & Async APIs interview questions — Easy

74 easy-level WebSocket & Async APIs questions from our API Testing bank, each with the correct answer and an explanation of why it is correct.

This topic slice is available to practise but is not yet part of our indexed set.

What this covers

WebSocket & Async APIs appears throughout API Testing interviews. At easy level, interviewers are typically checking that you know the fundamentals and can describe them precisely — definitions, defaults, and the basic mechanics. Work through these, then explain your answer out loud; the second part is what interviews actually test.

20 example questions

  1. 1. In the context of WebSocket, ping/pong frames is best described as:

    • A. Definition of an event's structure used for validation.
    • B. Named stream of events consumed by subscribers.
    • C. Mechanism handling consumers slower than producers.
    • D. Keep-alive mechanism verifying the connection is live.correct

    Why: ping/pong frames: Keep-alive mechanism verifying the connection is live.

  2. 2. Which of the following best describes 101 Switching Protocols in WebSocket?

    • A. Destination for messages that repeatedly fail processing.
    • B. Definition of an event's structure used for validation.
    • C. Named stream of events consumed by subscribers.
    • D. HTTP status completing a WebSocket upgrade.correct

    Why: 101 Switching Protocols: HTTP status completing a WebSocket upgrade.

  3. 3. Which of the following best describes event schema in WebSocket?

    • A. Destination for messages that repeatedly fail processing.
    • B. Definition of an event's structure used for validation.correct
    • C. Keep-alive mechanism verifying the connection is live.
    • D. HTTP status completing a WebSocket upgrade.

    Why: event schema: Definition of an event's structure used for validation.

  4. 4. Which of the following best describes backpressure in WebSocket?

    • A. Mechanism handling consumers slower than producers.correct
    • B. Definition of an event's structure used for validation.
    • C. Named stream of events consumed by subscribers.
    • D. HTTP status completing a WebSocket upgrade.

    Why: backpressure: Mechanism handling consumers slower than producers.

  5. 5. Which of the following best describes ping/pong frames in WebSocket?

    • A. Named stream of events consumed by subscribers.
    • B. Destination for messages that repeatedly fail processing.
    • C. TLS-secured WebSocket scheme.
    • D. Keep-alive mechanism verifying the connection is live.correct

    Why: ping/pong frames: Keep-alive mechanism verifying the connection is live.

  6. 6. Which of the following best describes dead letter queue in WebSocket?

    • A. Named stream of events consumed by subscribers.
    • B. Destination for messages that repeatedly fail processing.correct
    • C. HTTP status completing a WebSocket upgrade.
    • D. Keep-alive mechanism verifying the connection is live.

    Why: dead letter queue: Destination for messages that repeatedly fail processing.

  7. 7. In WebSocket, what does 101 Switching Protocols do or refer to?

    • A. HTTP status completing a WebSocket upgrade.correct
    • B. Named stream of events consumed by subscribers.
    • C. Destination for messages that repeatedly fail processing.
    • D. Definition of an event's structure used for validation.

    Why: 101 Switching Protocols: HTTP status completing a WebSocket upgrade.

  8. 8. In WebSocket, what does event schema do or refer to?

    • A. TLS-secured WebSocket scheme.
    • B. Definition of an event's structure used for validation.correct
    • C. HTTP status completing a WebSocket upgrade.
    • D. Destination for messages that repeatedly fail processing.

    Why: event schema: Definition of an event's structure used for validation.

  9. 9. What is the purpose of event schema in WebSocket?

    • A. Definition of an event's structure used for validation.correct
    • B. Mechanism handling consumers slower than producers.
    • C. Keep-alive mechanism verifying the connection is live.
    • D. Destination for messages that repeatedly fail processing.

    Why: event schema: Definition of an event's structure used for validation.

  10. 10. What is the purpose of 101 Switching Protocols in WebSocket?

    • A. Mechanism handling consumers slower than producers.
    • B. HTTP status completing a WebSocket upgrade.correct
    • C. Keep-alive mechanism verifying the connection is live.
    • D. TLS-secured WebSocket scheme.

    Why: 101 Switching Protocols: HTTP status completing a WebSocket upgrade.

  11. 11. In WebSocket, what does backpressure do or refer to?

    • A. Destination for messages that repeatedly fail processing.
    • B. HTTP status completing a WebSocket upgrade.
    • C. Keep-alive mechanism verifying the connection is live.
    • D. Mechanism handling consumers slower than producers.correct

    Why: backpressure: Mechanism handling consumers slower than producers.

  12. 12. What is the purpose of dead letter queue in WebSocket?

    • A. Mechanism handling consumers slower than producers.
    • B. Destination for messages that repeatedly fail processing.correct
    • C. HTTP status completing a WebSocket upgrade.
    • D. Keep-alive mechanism verifying the connection is live.

    Why: dead letter queue: Destination for messages that repeatedly fail processing.

  13. 13. Which of the following best describes Kafka topic in WebSocket?

    • A. Destination for messages that repeatedly fail processing.
    • B. Keep-alive mechanism verifying the connection is live.
    • C. HTTP status completing a WebSocket upgrade.
    • D. Named stream of events consumed by subscribers.correct

    Why: Kafka topic: Named stream of events consumed by subscribers.

  14. 14. In WebSocket, what does dead letter queue do or refer to?

    • A. Destination for messages that repeatedly fail processing.correct
    • B. Mechanism handling consumers slower than producers.
    • C. HTTP status completing a WebSocket upgrade.
    • D. Keep-alive mechanism verifying the connection is live.

    Why: dead letter queue: Destination for messages that repeatedly fail processing.

  15. 15. What is the purpose of ping/pong frames in WebSocket?

    • A. Keep-alive mechanism verifying the connection is live.correct
    • B. TLS-secured WebSocket scheme.
    • C. Named stream of events consumed by subscribers.
    • D. Mechanism handling consumers slower than producers.

    Why: ping/pong frames: Keep-alive mechanism verifying the connection is live.

  16. 16. What is the purpose of backpressure in WebSocket?

    • A. Definition of an event's structure used for validation.
    • B. Keep-alive mechanism verifying the connection is live.
    • C. Destination for messages that repeatedly fail processing.
    • D. Mechanism handling consumers slower than producers.correct

    Why: backpressure: Mechanism handling consumers slower than producers.

  17. 17. In WebSocket, what does ping/pong frames do or refer to?

    • A. Keep-alive mechanism verifying the connection is live.correct
    • B. Destination for messages that repeatedly fail processing.
    • C. HTTP status completing a WebSocket upgrade.
    • D. Definition of an event's structure used for validation.

    Why: ping/pong frames: Keep-alive mechanism verifying the connection is live.

  18. 18. In WebSocket, what does wss:// do or refer to?

    • A. Definition of an event's structure used for validation.
    • B. Mechanism handling consumers slower than producers.
    • C. HTTP status completing a WebSocket upgrade.
    • D. TLS-secured WebSocket scheme.correct

    Why: wss://: TLS-secured WebSocket scheme.

  19. 19. What is the purpose of Kafka topic in WebSocket?

    • A. Definition of an event's structure used for validation.
    • B. Named stream of events consumed by subscribers.correct
    • C. HTTP status completing a WebSocket upgrade.
    • D. Keep-alive mechanism verifying the connection is live.

    Why: Kafka topic: Named stream of events consumed by subscribers.

  20. 20. What is the purpose of wss:// in WebSocket?

    • A. Definition of an event's structure used for validation.
    • B. TLS-secured WebSocket scheme.correct
    • C. Mechanism handling consumers slower than producers.
    • D. Keep-alive mechanism verifying the connection is live.

    Why: wss://: TLS-secured WebSocket scheme.

Related API Testing topics