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, event schema is best described as:

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

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

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

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

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

  3. 3. 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.

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

    • A. TLS-secured WebSocket scheme.
    • B. HTTP status completing a WebSocket upgrade.
    • C. Mechanism handling consumers slower than producers.correct
    • D. Destination for messages that repeatedly fail processing.

    Why: backpressure: Mechanism handling consumers slower than producers.

  5. 5. 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.

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

    • A. TLS-secured WebSocket scheme.
    • B. Definition of an event's structure used for validation.
    • C. Keep-alive mechanism verifying the connection is live.correct
    • D. HTTP status completing a WebSocket upgrade.

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

  7. 7. 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.

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

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

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

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

    • A. Mechanism handling consumers slower than producers.
    • B. Definition of an event's structure used for validation.
    • 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.

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

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

    Why: backpressure: Mechanism handling consumers slower than producers.

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

    • A. Keep-alive mechanism verifying the connection is live.
    • B. TLS-secured WebSocket scheme.
    • C. Definition of an event's structure used for validation.correct
    • D. HTTP status completing a WebSocket upgrade.

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

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

    • A. Definition of an event's structure used for validation.
    • B. Destination for messages that repeatedly fail processing.
    • C. Named stream of events consumed by subscribers.correct
    • D. TLS-secured WebSocket scheme.

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

  13. 13. 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. Destination for messages that repeatedly fail processing.
    • D. HTTP status completing a WebSocket upgrade.

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

  14. 14. 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.

  15. 15. 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.

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

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

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

  17. 17. 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.

  18. 18. In the context of WebSocket, wss:// is best described as:

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

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

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

    • A. Named stream of events consumed by subscribers.
    • B. HTTP status completing a WebSocket upgrade.
    • C. Mechanism handling consumers slower than producers.
    • D. TLS-secured WebSocket scheme.correct

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

  20. 20. Which of the following best describes wss:// in WebSocket?

    • A. Named stream of events consumed by subscribers.
    • B. HTTP status completing a WebSocket upgrade.
    • C. Definition of an event's structure used for validation.
    • D. TLS-secured WebSocket scheme.correct

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

Related API Testing topics