Skip to content
Sharp

Networking interview questions

Asynchronous HTTP, HttpClient Basics, Jackson ObjectMapper, JSON Serialization, Socket Programming, Timeouts and Retries

127 questions with answers and explanations · 127 flashcards

Questions (page 3 of 3)

  1. When dealing with JSON serialization using Jackson's ObjectMapper, which of the following is true?Multiple choiceMedium
  2. When dealing with API versioning, which strategy could minimize breaking changes?Multiple choiceHard
  3. When configuring a Java HttpClient, what is the purpose of setting a timeout?Multiple choiceMedium
  4. Which feature of HttpClient allows for pipeline processing of requests and responses?Multiple choiceMedium
  5. Why do teams use CompletableFuture for HTTP requests in production code?Multiple choiceEasy
  6. How can you safely handle an HttpTimeoutException when using CompletableFuture?Multiple choiceMedium
  7. What format does the Jackson library primarily work with for data serialization?Multiple choiceEasy
  8. Why does the difference between a connection timeout and a request timeout matter in practice?Multiple choiceMedium
  9. How can you prevent thread exhaustion during API outages with Java's HttpClient?Multiple choiceHard
  10. When asynchronously calling multiple APIs with CompletableFuture, how can you ensure all tasks are completed?Multiple choiceHard
  11. When versioning an API, which practice helps maintain backward compatibility?Multiple choiceHard
  12. When can a POST request usually be retried automatically without risking duplicate business effects?Multiple choiceHard
  13. In the context of Java's HttpClient, what does setting a timeout ensure?Multiple choiceMedium
  14. Which of the following is a common method for handling JSON to Java object conversions in Jackson?Multiple choiceMedium
  15. How can you ensure thread safety when using CompletableFuture with multiple HTTP requests?Multiple choiceHard
  16. How would you explain a common strategy to handle transient network glitches in HTTP requests in an interview?Multiple choiceEasy
  17. Which of the following is a key benefit of using HTTP connection pooling in a Java HttpClient?Multiple choiceEasy
  18. Which Java class is used to configure timeouts in the HttpClient?Multiple choiceMedium
  19. What could be a consequence of excessive HTTP connection reuse in a high-load system?Multiple choiceHard
  20. How can you handle an HttpTimeoutException safely in a CompletableFuture chain?Multiple choiceHard
  21. Which response is the strongest sign that you should not blindly retry the same request payload?Multiple choiceEasy
  22. Which protocol does Java's HttpClient use by default?Multiple choiceEasy
  23. Why does the Content-Type header in an HTTP request matter in this design?Multiple choiceMedium
  24. How does setting a connection timeout differ from a request timeout?Multiple choiceMedium
  25. What potential issue arises from using CompletableFuture without proper exception handling in HTTP requests?Multiple choiceHard
  26. Why do teams use HTTP connection pooling in production code?Multiple choiceMedium
  27. In the context of Java's HttpClient, what is a potential downside of excessive HTTP connection reuse under high load?Multiple choiceHard