On 09.01.23 15:22, Manisha Chermadurai wrote:
Good evening Sir,


I am trying to control my secondary server with the primary server of mine.
Bothe are of versions 9.0. Primary server has been available in my physical
machine and my secondary server is in virtual machine. Both are of windows
10. I am connecting the vm's 8080 port through the ip address from primary
machine. It works fine. But I have a doubt like , Can I create my secondary
server without allocating port ? I have tried it works fine, but there is
no entry point for my server. I have doubt of creating a comnector for my
vm's server from my primary server and the condition is also like I have to
create a connector for my secondary server and it can be accessible only
when my primary server is down. I have researched and tried many things for
literally 2 weeks. But I got stuck in this. So, once again I repeat my
question,  it's I have to create a connector for my secondary server by my
primary server and it will be only accessible when my primary server is
down.So my client won't get chance to connect my secondary server through
the ip and port. I have tried failover with nginx. But I want to try this
only with my server.xml file.

If I understand your use case correctly, I'd recommend to set up a load balancer that handles the failover.

Other options depend on the scenario you're looking for: Should your secondary server be a hot-backup for the primary one (e.g. immediate failover with no downtime?) or a cold backup that get started only when some component determines that the primary server went down?

You will need to configure a Connector (with a port) on both servers if you want to be able to access them.

And I'd recommend to either use some orchestration for it, or just manually configure your second server. Tomcat itself is not the tool of choice to configure one server through another one. There are components that allow you to distribute deployed web applications (e.g. https://tomcat.apache.org/tomcat-9.0-doc/config/cluster-deployer.html), but that's a different use case than what you're asking for.

If you absolutely want to work around a load balancer, you might be able to do some trickery with firewall-level redirection, but I'd say that this is less transparent than explicitly configuring a load balancer.

Olaf






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to