What are the strategies for asynchronous processing in Spring MVC?

Spring MVC supports asynchronous request processing so a long-running operation doesn't tie up a servlet container thread for its entire duration. Instead of blocking, the request-handling thread is released and the response is completed later on a separate thread.

Key Points

Example

A reporting endpoint that queries a slow external system could return a DeferredResult immediately, then complete it once the external call finishes, allowing the server to handle other requests in the meantime instead of blocking a thread for the whole duration.

@GetMapping("/report")
public DeferredResult<Report> getReport() {
    DeferredResult<Report> result = new DeferredResult<>(5000L);
    reportService.generateAsync(report -> result.setResult(report));
    return result;
}

Interview Tip

A concise interview answer is

For async processing I'd use Callable or DeferredResult from a controller method to free up the request thread while a long operation completes elsewhere, or WebAsyncTask if I need a timeout and custom executor. For background service work I'd reach for @Async with @EnableAsync, often returning a CompletableFuture.

Last updated: 16 July 2026

Previous question: How can caching be implemented in Spring MVC?

Next question: How can you scale a Spring MVC application horizontally?

More Spring MVC (Optional) interview questions

All Spring MVC (Optional) questions