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