Spring - Concurrency Model

Table of Contents

Reading material

  1. https://docs.spring.io/spring-framework/reference/web/webflux/new-framework.html

TODO

  1. https://piotrminkowski.com/2023/04/30/concurrency-with-kafka-and-spring-boot/
  2. https://www.baeldung.com/spring-singleton-concurrent-requests
  3. https://www.e4developer.com/2018/03/30/introduction-to-concurrency-in-spring-boot/
  4. https://stackoverflow.com/questions/34738060/spring-boot-application-and-concurrency-issues
  5. https://codereview.stackexchange.com/questions/261389/spring-boot-api-avoiding-concurrency-issues
  6. https://marketsplash.com/tutorials/spring/concurrency-in-spring-framework/
  7. https://stackoverflow.com/questions/30171027/is-spring-boot-mvc-controller-multithreaded
  8. https://www.codingninjas.com/studio/library/multithreading-in-java-spring-boot
  9. https://medium.com/@alsigitguntoro/why-you-might-choose-java-spring-boot-for-multithreading-91c8df3abc66
  10. https://mirbozorgi.com/using-completeablefuture-in-spring-boot-for-multi-threading/
  11. https://stackoverflow.com/questions/45939628/spring-app-sonarqube-issue-s3749
  12. 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.

Tags

  1. Spring Beans - Scopes