On 3/8/2016 8:54 AM, Christopher Schultz wrote: > Edwin, > > On 3/8/16 11:46 AM, Edwin Quijada wrote: > > >> ________________________________________ From: Christopher Schultz >> <ch...@christopherschultz.net> Sent: Tuesday, March 8, 2016 3:48 >> PM To: Tomcat Users List Subject: Re: Advice on Cluster in one >> machine > >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > >> Edwin, > >> On 3/8/16 8:19 AM, Edwin Quijada wrote: >>> I am new using Tomcat so I have a question about performance. I >>> have installed a cluster with 2 tomcats and apache webserver >>> like proxy in front of Tomcat cluster but this whole thing is in >>> one server, somebody tell me that is not useful beacuse is in the >>> same server that is better give more resources to one tomcat and >>> not split the resources in two. > >> Performance-wise, your friend is right: a two-node cluster on one >> machine is going to use more resources than a single node on that >> machin e. > >> However, running two cluster nodes on a single server isn't a >> completely stupid idea. If you want to have zero-downtime >> deployments, you can take one node down, upgrade it, then switch. >> So there's value there. As for fault-tolerance, the single point of >> failure is the whole machine: if that server isn't available, no >> services are available . > >> That's why people usually have a hardware load balancer (fairly >> simple, fairly reliable) and several web/app servers, just in case >> one of them fails. If one node fails, the service is still >> available. > >>> Somebody here can give any advice about this configuration what >>> do you think about this ? In this server I have websockets in >>> cluster and I am having problems with websockets in cluster > >> Clustering and websockets have little to do with one another, >> since the connection goes to one node and the cluster really just >> manages things like sessions (which are orthogonal to connections, >> protocols, etc.). > >> OK, so if I want to run my app like myserver.com I can use apache >> like reverse proxy to do this and still working with websockets , >> I want to do this something like this > >> Apache -> Tomcat -> DB > >> but the websocket still works ? > > I'm not sure how well websockets work through httpd right now. I'm > certainly no expert on websocket, so someone else will have to give > you better information. Note that the database is also not relevant. > > But in general, yes, you can use httpd as a reverse proxy for multiple > Tomcats. > > -chris
I'm not an expert on websockets either, but it looks like this: https://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html will work. I'm not sure how to fit together all of the pieces, but it looks possible at least. . . . just my two cents /mde/
signature.asc
Description: OpenPGP digital signature