Is there a way to deploy multiple vertx apps with HTTP server on same machine?

361 views
Skip to first unread message

javadevmtl

unread,
Sep 4, 2014, 1:21:06 PM9/4/14
to ve...@googlegroups.com
So I have two separate "web" applications which are started in their own JVM instance and I would like to deploy them on the same box with the same port. I guess this is not possible?

Kinda like having Jetty, Apache or IIS which is one server serving/hosting multiple web applications/WARs.

I assume some sort of custom solution would have to be implemented for this....

Harlan H. Bloom

unread,
Sep 4, 2014, 2:11:10 PM9/4/14
to ve...@googlegroups.com
Just make sure they are using different ports.  I do this all the time.


From: "javadevmtl" <java.d...@gmail.com>
To: ve...@googlegroups.com
Sent: Thursday, September 4, 2014 12:21:06 PM
Subject: [vertx:21051] Is there a way to deploy multiple vertx apps with HTTP server on same machine?


So I have two separate "web" applications which are started in their own JVM instance and I would like to deploy them on the same box with the same port. I guess this is not possible?

Kinda like having Jetty, Apache or IIS which is one server serving/hosting multiple web applications/WARs.

I assume some sort of custom solution would have to be implemented for this....

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Harlan H. Bloom

unread,
Sep 4, 2014, 2:13:40 PM9/4/14
to ve...@googlegroups.com
I mis-read your question.  You cannnot have multiple different services using the same port on the same IP address.  The operating system wouldn't know which service you intended to talk to if they were on the same port.


From: "Harlan H. Bloom" <har...@bloomenterprises.org>
To: ve...@googlegroups.com
Sent: Thursday, September 4, 2014 1:11:01 PM
Subject: Re: [vertx:21052] Is there a way to deploy multiple vertx apps with HTTP server on same machine?

javadevmtl

unread,
Sep 4, 2014, 2:39:10 PM9/4/14
to ve...@googlegroups.com
Yeah I know. I was just wondering if people have some solution. Cause I would like to run all apps on the standard http(s) ports.

I guess one way would be to reverse proxy it, but bleh, don't feel like having to install yet another thing lol! I'm on windows, I could try with IIS but do i really want to try??? lol and Nginx is not robust for Windows yet 9Something to do with threading model).

The real cool way would be to write one vertx based HTTP server and based on the PATH route to different "application" verticles/handlers internally. So every time you drop a module in the modules folder it registers itself with the main HTTP server and voila...
But again to much work for what is is now...

Alexander Lehmann

unread,
Sep 10, 2014, 6:25:26 PM9/10/14
to ve...@googlegroups.com
You should be able to put the http handler into one verticle/jvm and call the other jvm from that via the event bus (not sure how to autoconfigure that though)

If you want to do it with http, you will have to implement a proxy request based on paths from one http handler to the other, that should be rather simple.

Incidentally, you cannot run a jetty or tomcat server in two instances on the same port either, if you are running two webapps, the listener and the webapp instances are always in the same jvm.
Reply all
Reply to author
Forward
0 new messages