Search code examples
spring-boothostingspring-webfluxproductionreactor-netty

How do people host Spring Boot apps with WebFlux on Reactor Netty in production?


I know it's a vague question but that's because I am not clear enough on what people are doing to ask anything more specific. I currently run my own apps with the embedded reactor netty server for development and basically push the embedded server inside a jar to cloud foundry to run the embedded server in production.

What are the other ways out there to set up a production environment for reactive reactor netty apps that people are using, or any documentation you might have seen?


Solution

  • I'm no sure that there is any difference between hosting the reactive spring-webflux application and regular applications.

    Spring boot creates a jar with everything bundled inside (netty or more old-school tomcat) - it doesn't matter.

    Then you can take this and run it "as is" on your server (on-premise, cloud ec2 style whatever you have, this really depends on your organization) directly with java -jar app.jar

    Or, if you have more advanced needs/setup:

    "Containerize" the application and create a docker (usually, although there are alternatives) image that runs the spring boot application. and then deploy it on kubernetes cluster, for example. At this point you should really consult with your DevOps people so that they'll tell you what is the way of deployment in your organization. Besides kubernetes cluster there are many other alternatives: - cloud provider specific solutions, like ECS or Fargate in amazon AWS - Docker Swarm to name a few

    All these solutions are pretty advanced, allow auto-scaling, advanced liveness monitoring and so forth. As an organization you usually pick the one that meets your needs