简体   繁体   English

人们如何在生产中的 Reactor Netty 上使用 WebFlux 托管 Spring Boot 应用程序?

[英]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.我目前使用嵌入式 reactor netty 服务器运行我自己的应用程序进行开发,并且基本上将 jar 内的嵌入式服务器推送到云代工厂以在生产中运行嵌入式服务器。

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?为人们正在使用的反应堆 netty 应用程序或您可能看过的任何文档设置生产环境的其他方法是什么?

I'm no sure that there is any difference between hosting the reactive spring-webflux application and regular applications.我不确定托管反应式 spring-webflux 应用程序和常规应用程序之间有什么区别。

Spring boot creates a jar with everything bundled inside (netty or more old-school tomcat) - it doesn't matter. Spring Boot 创建了一个 jar,里面捆绑了所有东西(netty 或更老式的 tomcat) - 没关系。

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然后,您可以直接使用java -jar app.jar在您的服务器(内部部署,云 ec2 风格,无论您拥有什么,这实际上取决于您的组织)上“按原样”运行它

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. “容器化”应用程序并创建一个运行 spring boot 应用程序的 docker(通常,尽管有替代方案)映像。 and then deploy it on kubernetes cluster, for example.然后将其部署在 kubernetes 集群上,例如。 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.在这一点上,您应该真正咨询您的 DevOps 人员,以便他们告诉您组织中的部署方式。 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除了 kubernetes 集群,还有许多其他替代方案: - 云提供商特定的解决方案,例如亚马逊 AWS 中的 ECS 或 Fargate - Docker Swarm 仅举几例

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作为一个组织,您通常会选择满足您需求的组织

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM