Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-16538

[docs] Document threading model in Spring WebFlux

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 5.0.4
    • Fix Version/s: 5.0.5
    • Component/s: [Documentation]
    • Labels:
      None

      Description

      Because the Spring team is communicating about the pros/cons of the async, non-blocking runtime model, developers are paying more attention to available threads in their WebFlux applications.

      Here is an example of a StackOverflow question about this theme.

      Per my comment on that question, I don't think we can document everything here, since we rely on the underlying web server, datastore drivers, and much more (and all of those might depend on the operating system). Developers can also apply scheduling operators on the pipeline, which will change the picture when looking at application threads.

      Currently, libraries like Reactor and Reactor Netty don't document this in details.

      On the other hand, our reference documentation could have a few pointers and explain:

      • the general threading model and how libraries, choice of operators and operating systems can change the picture
      • that one should not use block or subscribe operators within WebFlux Controllers
      • how publishOn and subscribeOn operators should be used with great care

        Attachments

          Activity

            People

            Assignee:
            rstoya05-aop Rossen Stoyanchev
            Reporter:
            bclozel Brian Clozel
            Last updater:
            Spring Issues Spring Issues
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 37 weeks, 6 days ago