You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Suhaas Lang <su...@gmail.com> on 2014/05/19 17:40:05 UTC

Tomcat 7 Cluster with load balancing only needs to run a service periodically

The Tomcat cluster is configured as load balancer only. There is no session
replication. So in case a Tomcat node on which the user session is running,
dies in that case the session is lost.

We do need to run a service on that cluster periodically. Obviously it
cannot run on both servers, but at the same time one has to ensure it has
to be run on at least one server after certain interval.

What is an elegant solution in this case?

Regards,

Suhaas

Re: Tomcat 7 Cluster with load balancing only needs to run a service periodically

Posted by Suhaas Lang <su...@gmail.com>.
Yes, Christopher, I know.

Any pointers? Any open source libraries that might be worth looking at?

Regards,

Suhaas
On May 26, 2014 2:52 PM, "Christopher Schultz" <ch...@christopherschultz.net>
wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Suhas,
>
> On 5/21/14, 9:46 AM, Suhaas Lang wrote:
> > Thanks for your response. No. I am not allowed to use cron :-)
> >
> > One thing I have been asked to look at is nodes co-ordinating by
> > sending events to each other.
> >
> > But again I am wondering how coordination would take place in case
> > one node goes down. In that case, when it is started again and
> > becomes a part of the cluster, it would try to start services that
> > shoukd run periodically. But its intervals woukd be out of sync wit
> > rest of the clusters.
>
> Sounds like you need to do some research.
>
> - -chris
>
> > Suhaas On May 20, 2014 9:11 PM, "Christopher Schultz"
> > <ch...@christopherschultz.net> wrote:
> >
> > Suhaas,
> >
> > On 5/19/14, 11:40 AM, Suhaas Lang wrote:
> >>>> The Tomcat cluster is configured as load balancer only. There
> >>>> is no session replication. So in case a Tomcat node on which
> >>>> the user session is running, dies in that case the session is
> >>>> lost.
> >>>>
> >>>> We do need to run a service on that cluster periodically.
> >>>> Obviously it cannot run on both servers, but at the same time
> >>>> one has to ensure it has to be run on at least one server
> >>>> after certain interval.
> >>>>
> >>>> What is an elegant solution in this case?
> >
> > Use cron with a non-web-based tool?
> >
> > -chris
> >>
> >> ---------------------------------------------------------------------
> >>
> >>
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJTg41EAAoJEBzwKT+lPKRY7gsQAJgd8gyKsWU+mAMYKvxAaH0m
> d0a9pYfQgAJAxfXQWT1Rvu4fJ1ECk/nKVzC7Onx3tWEP+3ddoMA0BIi5U/eaU/Og
> gqhMCeW4Y5LRPtVeiviTg2qUAir9fSv8P9NBJd0EiYQ//MwFr0OF2acnPW9dmPpk
> nZX+Q9aVJsztoz0wqlRth0+ty0kksXaET09L+oIKnlvaPUh26qf+8ySwPYFewVRi
> J3A0VkknAj3u9PUjGbAQG1NpPfUMBx5DKViPfhix2tEnTuLN6I+YKUQXUJDZeqYB
> Dwe5NpdscZD2WfjULetGiP4TxzT9uUfuEnWnXPDSN+FoexEkbUEMQ1TDu/Ireypp
> E0rM5UHfR5NuzlmF/CfUHbIrwvlY6Onc8eyoCaC6IuKOHUWy/L3dtcuoSK90BW0Q
> WnsrZE1uICHzi5akLFkMRvimrQfTnXEKW9qkMwVTBLBCvsHl8y4eJRQa7Lh6T20a
> XqJgKlauC4jfIJBPowBUVfkrAL8IDSKUO0xyO9aVGhhAG+gC8foGzuKHn1aaBzAc
> eXUnc/NkI7GNTKOBqPcsjB3tnZD0Em8XhJrZU34B1xJU1OfZnwJUo131IKL+xoWb
> QME5+Nx16Dy6QoId+RnvHy4WyFDzZ86UQlgV2IkwYMG/GzGsZWPoMa2heUb0TeNa
> wfGoGVByfoJZlwQ6rxEo
> =EdQJ
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 7 Cluster with load balancing only needs to run a service periodically

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Suhas,

On 5/21/14, 9:46 AM, Suhaas Lang wrote:
> Thanks for your response. No. I am not allowed to use cron :-)
> 
> One thing I have been asked to look at is nodes co-ordinating by
> sending events to each other.
> 
> But again I am wondering how coordination would take place in case
> one node goes down. In that case, when it is started again and
> becomes a part of the cluster, it would try to start services that
> shoukd run periodically. But its intervals woukd be out of sync wit
> rest of the clusters.

Sounds like you need to do some research.

- -chris

> Suhaas On May 20, 2014 9:11 PM, "Christopher Schultz"
> <ch...@christopherschultz.net> wrote:
> 
> Suhaas,
> 
> On 5/19/14, 11:40 AM, Suhaas Lang wrote:
>>>> The Tomcat cluster is configured as load balancer only. There
>>>> is no session replication. So in case a Tomcat node on which
>>>> the user session is running, dies in that case the session is
>>>> lost.
>>>> 
>>>> We do need to run a service on that cluster periodically.
>>>> Obviously it cannot run on both servers, but at the same time
>>>> one has to ensure it has to be run on at least one server
>>>> after certain interval.
>>>> 
>>>> What is an elegant solution in this case?
> 
> Use cron with a non-web-based tool?
> 
> -chris
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTg41EAAoJEBzwKT+lPKRY7gsQAJgd8gyKsWU+mAMYKvxAaH0m
d0a9pYfQgAJAxfXQWT1Rvu4fJ1ECk/nKVzC7Onx3tWEP+3ddoMA0BIi5U/eaU/Og
gqhMCeW4Y5LRPtVeiviTg2qUAir9fSv8P9NBJd0EiYQ//MwFr0OF2acnPW9dmPpk
nZX+Q9aVJsztoz0wqlRth0+ty0kksXaET09L+oIKnlvaPUh26qf+8ySwPYFewVRi
J3A0VkknAj3u9PUjGbAQG1NpPfUMBx5DKViPfhix2tEnTuLN6I+YKUQXUJDZeqYB
Dwe5NpdscZD2WfjULetGiP4TxzT9uUfuEnWnXPDSN+FoexEkbUEMQ1TDu/Ireypp
E0rM5UHfR5NuzlmF/CfUHbIrwvlY6Onc8eyoCaC6IuKOHUWy/L3dtcuoSK90BW0Q
WnsrZE1uICHzi5akLFkMRvimrQfTnXEKW9qkMwVTBLBCvsHl8y4eJRQa7Lh6T20a
XqJgKlauC4jfIJBPowBUVfkrAL8IDSKUO0xyO9aVGhhAG+gC8foGzuKHn1aaBzAc
eXUnc/NkI7GNTKOBqPcsjB3tnZD0Em8XhJrZU34B1xJU1OfZnwJUo131IKL+xoWb
QME5+Nx16Dy6QoId+RnvHy4WyFDzZ86UQlgV2IkwYMG/GzGsZWPoMa2heUb0TeNa
wfGoGVByfoJZlwQ6rxEo
=EdQJ
-----END PGP SIGNATURE-----

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


Re: Tomcat 7 Cluster with load balancing only needs to run a service periodically

Posted by Suhaas Lang <su...@gmail.com>.
Thanks for your response. No. I am not allowed to use cron :-)

One thing I have been asked to look at is nodes co-ordinating by sending
events to each other.

But again I am wondering how coordination would take place in case  one
node goes down. In that case, when it is started again and becomes a part
of the cluster, it would try to start services that shoukd run
periodically. But its intervals woukd be out of sync wit rest of the
clusters.

Regards,

Suhaas
On May 20, 2014 9:11 PM, "Christopher Schultz" <ch...@christopherschultz.net>
wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Suhaas,
>
> On 5/19/14, 11:40 AM, Suhaas Lang wrote:
> > The Tomcat cluster is configured as load balancer only. There is no
> > session replication. So in case a Tomcat node on which the user
> > session is running, dies in that case the session is lost.
> >
> > We do need to run a service on that cluster periodically. Obviously
> > it cannot run on both servers, but at the same time one has to
> > ensure it has to be run on at least one server after certain
> > interval.
> >
> > What is an elegant solution in this case?
>
> Use cron with a non-web-based tool?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJTe/0ZAAoJEBzwKT+lPKRY7ogQAIBomKhx/ii5MvMs2ip3n08H
> RLCPHSMg1ZN9TvbWbYfiGY+fxTCf+r/KN+v3YIJ38gbLNgZ++UcZ8cqMZD3tXWk+
> bF7eo9BzisSzKLfXqrQ8+KjOpygpMXorMduEGB8dUG9ySx6ntZjD0254EdqaFC5h
> 6+Z0D59KJ9JS70pbLkkVGRSoWTKGRQPMwuoO/bwtrLcUm2QmbFqAxj/sbFVN3Qas
> 63c5KcEY1crnxLkr0DkujKuaImJa+qEYntZxXwnbk2I4mBVGNVmsBoRRUYA0Le/M
> 1JdvEl12alHIbyTQHeEcyCq0KpNqFbeVfXAnYwMg/Sx6Y8JMkv4jzpooCbRvzkJO
> mZMlOgZKZQ2c94Lqx6Q7u9ZCCOGk1jvcv7R2BzK36rpd/Xv6x6EFLyEHcp86oY4s
> 2348RtUb0chF4he5UCeeQEHppdJt4zImMCw/Ar5CD0m8mQZBAUjFcjbF1w3RqUmt
> KPP6VWDMebyZHRS1f18SHDzcArY7+b155rbgXB9HQx262UmA0hPweyNmxRkKxzLR
> KmZDIVjfpk/+gOdB5HQIp9AgRj6zJhSmt0lUpWCqERlJlCASeOP7MBVaHERzUvJP
> JCudcBNplxxexXQ+qV3UUmqDZzsbK8PqX1kzCuIVEKkyY6e1F6n6NqGgxHOP5Pbm
> 3u1Aw2Vm1Vqf/+2N2oiE
> =jTiU
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 7 Cluster with load balancing only needs to run a service periodically

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Suhaas,

On 5/19/14, 11:40 AM, Suhaas Lang wrote:
> The Tomcat cluster is configured as load balancer only. There is no
> session replication. So in case a Tomcat node on which the user
> session is running, dies in that case the session is lost.
> 
> We do need to run a service on that cluster periodically. Obviously
> it cannot run on both servers, but at the same time one has to
> ensure it has to be run on at least one server after certain
> interval.
> 
> What is an elegant solution in this case?

Use cron with a non-web-based tool?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTe/0ZAAoJEBzwKT+lPKRY7ogQAIBomKhx/ii5MvMs2ip3n08H
RLCPHSMg1ZN9TvbWbYfiGY+fxTCf+r/KN+v3YIJ38gbLNgZ++UcZ8cqMZD3tXWk+
bF7eo9BzisSzKLfXqrQ8+KjOpygpMXorMduEGB8dUG9ySx6ntZjD0254EdqaFC5h
6+Z0D59KJ9JS70pbLkkVGRSoWTKGRQPMwuoO/bwtrLcUm2QmbFqAxj/sbFVN3Qas
63c5KcEY1crnxLkr0DkujKuaImJa+qEYntZxXwnbk2I4mBVGNVmsBoRRUYA0Le/M
1JdvEl12alHIbyTQHeEcyCq0KpNqFbeVfXAnYwMg/Sx6Y8JMkv4jzpooCbRvzkJO
mZMlOgZKZQ2c94Lqx6Q7u9ZCCOGk1jvcv7R2BzK36rpd/Xv6x6EFLyEHcp86oY4s
2348RtUb0chF4he5UCeeQEHppdJt4zImMCw/Ar5CD0m8mQZBAUjFcjbF1w3RqUmt
KPP6VWDMebyZHRS1f18SHDzcArY7+b155rbgXB9HQx262UmA0hPweyNmxRkKxzLR
KmZDIVjfpk/+gOdB5HQIp9AgRj6zJhSmt0lUpWCqERlJlCASeOP7MBVaHERzUvJP
JCudcBNplxxexXQ+qV3UUmqDZzsbK8PqX1kzCuIVEKkyY6e1F6n6NqGgxHOP5Pbm
3u1Aw2Vm1Vqf/+2N2oiE
=jTiU
-----END PGP SIGNATURE-----

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