On 09.01.23 18:12, Mark Thomas wrote:
Your mentor is wrong.

Mark

To elaborate on that: When one server is down, its configuration will be inactive as well. There's nothing that this non-running server will be able to do for you. You'll need to externalize the decision which server's responses to serve to /some/ external entity


Olaf



On 09/01/2023 14:56, Manisha Chermadurai wrote:
Thanks for this.

I have set up the solution for failover using nginx as a proxy server
between my two tomcat servers. But my mentor told with only using tomcat
server's configuration files, you can redirect the requests to another
server if and only if the particular server is down. So I am searching for this solution, and came to know about this group. So I requested about this
, may be I will get some ideas.

Really thanks for response.

On Mon, 9 Jan 2023, 8:21 pm Olaf Kock, <tom...@olafkock.de> wrote:

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




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


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

Reply via email to