On 15/05/2012 16:16, Christopher Schultz wrote: > Vickie, > > (Bringing this back on-list). > > On 5/15/12 10:21 AM, Vickie Troy-McKoy wrote: >>> Date: Tue, 15 May 2012 10:04:33 -0400 From: >>> ch...@christopherschultz.net Subject: Re: Multiple tomcat >>> Instances on Same Server and One Apache Instance >>> >>> Try to express your requirements in simpler language. For >>> instance, you have two versions of your software: one one port >>> 8009 and one on port 7009. Under what conditions should a >>> particular user be sent to either of those versions? >>> >>> If you are using sessions, the load-balancer will keep a client >>> associated with the right version *after* the first request, but >>> you still need to decide under which circumstances a *new* client >>> should be sent to one or the other. Once you can answer that, we >>> can help you configure it. > >> Chris, I beg to differ. I know EXACTLY what I want. When I >> explained exactly what I wanted, I was told about the the >> loadbalancer worker, which I have never used before. However, when >> I configured it as Andre (so graciously) explained it, I am >> receiving the same results as my simple workers list configuration. >> EXACTLY what I wanted to do was explained initially and clarified >> in my "5/14/12 9:54 PM" post. > > This one? (quoted from here on out) > >> I just want to forward based on the port that the Tomcat instance >> is running on. > > Sadly, the client doesn't know the port number of the backend Tomcat. > So, how do you propose that httpd make the decision on which backend > Tomcat to contact? This is why I said you didn't have your > requirements straight. > >> The 2 tomcat instances running on the same server is really the >> same application--but different versions. And, I thought that I >> could use the existing Apache instance to forward requests to the >> new version of the app running on tomcat as well. > > You can, you just need to express the rules for choosing which > backend. I don't see that anywhere in the description of your problem. > >> But, if I want (e.g. the tsademo app) the tomcat instance running >> on port 8009; and tsademo is being forwarded to both ports--how can >> I be sure that I would get the tsademo running on port 8009 and not >> the one running on 7009? > > There needs to be some external factor. That's what I'm asking you to > provide: some way of telling which backend should be chosen. If you > don't care, then you can use the lb to randomly-assign new clients to > a backend. That seems unlikely to be the desired outcome: you want > some clients to go to one version and others to go to the other. But > which ones go where? That's the question you haven't answered.
Really, the requirement was achievable in a simple way. p >> I tried using the Virtual host in Apache; but, ran into issues with >> that. Or, should I just go ahead and create an entirely new apache >> instance for the new tomcat instance? > > Maybe I've misunderstood something: do you have httpd listening on two > ports (say, 80 and 81) and two backend Tomcats (8009 and 7009) and you > want to connect (for example) 80 -> 8009 and 81 -> 7009? > > That can easily be done with VirtualHost configuration, but you have > to include the port number in the VirtualHost. > > I would be surprised if that last bit is what you really have because > you haven't said anything about multi-port httpd yet. You also didn't > post your VirtualHost configuration so I suspect it's not relevant. > > -chris > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > -- [key:62590808]
signature.asc
Description: OpenPGP digital signature