Spring Boot Async and Scheduling
Question Variations
- "Why is the default async executor often insufficient?"
- "What happens to a scheduled job in several replicas?"
- "Why might calling an `@Async` method internally run synchronously?"
Why This Is Asked
Async and scheduling annotations hide execution policy details. Interviewers assess whether you size executors, handle failures, and avoid duplicate work in a cluster.
Key Concepts
@Asyncdispatches through a configured task executor.@Scheduledruns work according to a local scheduler.- Proxy rules apply to annotation-based execution.
- Multiple instances require distributed coordination for singleton jobs.
Question Variations
- “Why is the default async executor often insufficient?”
- “What happens to a scheduled job in several replicas?”
- “Why might calling an
@Asyncmethod internally run synchronously?”