Spring - Concurrency Model
Table of Contents
Reading material
TODO
- https://piotrminkowski.com/2023/04/30/concurrency-with-kafka-and-spring-boot/
- https://www.baeldung.com/spring-singleton-concurrent-requests
- https://www.e4developer.com/2018/03/30/introduction-to-concurrency-in-spring-boot/
- https://stackoverflow.com/questions/34738060/spring-boot-application-and-concurrency-issues
- https://codereview.stackexchange.com/questions/261389/spring-boot-api-avoiding-concurrency-issues
- https://marketsplash.com/tutorials/spring/concurrency-in-spring-framework/
- https://stackoverflow.com/questions/30171027/is-spring-boot-mvc-controller-multithreaded
- https://www.codingninjas.com/studio/library/multithreading-in-java-spring-boot
- https://medium.com/@alsigitguntoro/why-you-might-choose-java-spring-boot-for-multithreading-91c8df3abc66
- https://mirbozorgi.com/using-completeablefuture-in-spring-boot-for-multi-threading/
- https://stackoverflow.com/questions/45939628/spring-app-sonarqube-issue-s3749
- https://cloud-ci.sgs.com/sonar/coding_rules?open=java%3AS3749&rule_key=java%3AS3749
Overview
In Spring Boot- Controllers and Services are by default Singletons. That introduces possible concurrency problems if you are not careful. You are also usually dealing with a limited thread-pool. Familiarise yourself with these concepts.