简体   繁体   English

在 vert.x 中运行 Verticle 的最佳方式是什么?

[英]Which best way to run verticle in vert.x?

I am new to Vertex.我是顶点的新手。

I have main verticle for accepting HTTP request and four other verticles.我有用于接受 HTTP 请求的主要 Verticle 和其他四个 Verticle。

Advice me please best way to run verticle.请告诉我运行verticle的最佳方式。

first第一的

vertx run com.xxx.MainVerticle -cluster
vertx run com.xxx.OtherVericle2 -cluster
vertx run com.xxx.OtherVericle3 -cluster
vertx run com.xxx.OtherVericle4 -cluster
vertx run com.xxx.OtherVericle5 -cluster

second第二

command vertx run com.xxx.MainVerticle and
vertx.deployVerticle("OtherVericle1") in MainVerticle.
vertx.deployVerticle("OtherVericle2") in MainVerticle.
vertx.deployVerticle("OtherVericle3") in MainVerticle.
vertx.deployVerticle("OtherVericle4") in MainVerticle.

Which best way to run verticle?哪种最好的方式来运行verticle?

The first form will create five JVM processes with clustered Vert.x instances.第一种形式将创建五个带有集群 Vert.x 实例的 JVM 进程。

The second form will create just one JVM process with non clustered Vert.x instance.第二种形式将只创建一个带有非集群 Vert.x 实例的 JVM 进程。

It's difficult to answer your question without further details but usually you want clustered Vert.x if you need High Availability and Fail-Over如果没有更多详细信息,很难回答您的问题,但如果您需要高可用性和故障转移,通常您需要集群 Vert.x

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

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