You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Enrique Arizón <e_...@yahoo.com> on 2008/04/07 21:49:52 UTC

RE: Tomcat clustering

Just one point:

 Notice clustering ussually must be made at the
highest application layer. Generic Clustering support
provided by containers can be of little help in a real
world scenarios.

 If you users sessions are simple tomcat sessions
clustering will be enough but if you have complex
session data structures (let's say for example a
java.util.ArrayList/Hashtable) you will need custom
solutions to sync sessions between clustered nodes.

 The easy/non-optimal way to go could be to store
state in a clustered database and use tomcat sessions
to "mark" what must be fetch from database. Mysql
makes a great help since it use in memory (RAM)
storage for clustered tables, is easy to set up and
just limited by the maximum node size (a few Gigas
with moderm&cheap hardware).





--- Ch Praveena <ps...@gmail.com> escribió:

> Hi all,
> 
>    I want to cluster Tomcat6 along with session
> replication to implement
> Loadbalancing. From the document,
>
http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html
> I have started
> making the things.
> 
>     Let me know where can I identify the default
> value of Multicast address
> is 228.0.0.4
> 
> Please let me know if any other tutorials or
> articles in a detailed way for
> performing Tomcat6 clustering.
> -- 
> Regards,
> 
> Praveena Chalamcharla,
> Securview....
> 


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


Re: Tomcat clustering

Posted by Anupam Beri <an...@gmail.com>.
Hello All ,
                       I am a newbie to the Tomcat and Tomcat clustering
environment .I was just going through some posts on this forum for reference
.
I wish to deploy the classic JPetStore application which comes with the
Spring framework in the clustered environment involving 2 machines

For this, I installed Apache 2.2 , Tomcat 6.0.18 and mod_jk on each of these
machines . I configured mod_jk load balancer for sticky session and deployed
JPetStore on either of them .
But once I start tomcat and apache on either machine and try to do some
transactions , I cannot see any sessions being exchanged between the two
members of the cluster.

The JPetStore application also uses a database (hsqldb) and its necessary to
start one on either machine (it is not a shared one).

I was reading some documentation regarding if the session attributes are to
be implemented from serializable interface...but I see they already have
been in the source code .

I will be greateful if anyone could help me out and give a  good insight on
where I am going wrong ?
I have attached the server.xml , workers.properties and catalina.out for the
two nodes in the attached file.
Any help is deeply appreciated ! 

Best Regards !!
Anupam http://www.nabble.com/file/p20382167/clustering_files.rar
clustering_files.rar 

Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Enrique,
> 
> Enrique Arizón wrote:
> | | Mysql makes a great help since it use in memory
> | (RAM) storage for
> | | clustered tables
> |
> | What are you talking about? The closest thing to
> | "clustered tables" that
> | MySQL supports is the FEDERATED storage engine, and
> | there are no
> | guarantees about RAM usage for it.
> |
> |> Guess we are not speaking about the same thing. I
> |> refer to NDB Cluster engine:
> |
> |> http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster.html
> |
> |>  I read time ago that Google improved such engine for
> |> its own purposes and the next Mysql will show improved
> |> clustering stuff. Also, since Mysql is now part of Sun
> |> I guess also it will get a boost from Solaris
> |> engineering (I mean, Dtrace).
> 
> Aah, yes... the NDB storage engine. This is great if you don't require
> durability of your data :) At least MySQL 5.1 has that nice "write it to
> the disk, too" feature.
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.8 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAkf6lecACgkQ9CaO5/Lv0PD8TgCgt5X0jagI6WH+Rh91wSW3CC+h
> agQAoIPoJJGJaJktjw6e/vQv3mLIT3vY
> =/g66
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-clustering-tp16249049p20382167.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Tomcat clustering

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

Enrique,

Enrique Arizón wrote:
| | Mysql makes a great help since it use in memory
| (RAM) storage for
| | clustered tables
|
| What are you talking about? The closest thing to
| "clustered tables" that
| MySQL supports is the FEDERATED storage engine, and
| there are no
| guarantees about RAM usage for it.
|
|> Guess we are not speaking about the same thing. I
|> refer to NDB Cluster engine:
|
|> http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster.html
|
|>  I read time ago that Google improved such engine for
|> its own purposes and the next Mysql will show improved
|> clustering stuff. Also, since Mysql is now part of Sun
|> I guess also it will get a boost from Solaris
|> engineering (I mean, Dtrace).

Aah, yes... the NDB storage engine. This is great if you don't require
durability of your data :) At least MySQL 5.1 has that nice "write it to
the disk, too" feature.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkf6lecACgkQ9CaO5/Lv0PD8TgCgt5X0jagI6WH+Rh91wSW3CC+h
agQAoIPoJJGJaJktjw6e/vQv3mLIT3vY
=/g66
-----END PGP SIGNATURE-----

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


Re: Tomcat clustering

Posted by Enrique Arizón <e_...@yahoo.com>.
--- Christopher Schultz <ch...@christopherschultz.net>
escribió:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Enrique,
> 
> Enrique Arizón wrote:
> | If you users sessions are simple tomcat sessions
> clustering will be
> | enough but if you have complex session data
> structures (let's say for
> | example a java.util.ArrayList/Hashtable) you will
> need custom
> | solutions to sync sessions between clustered
> nodes.
> 
> Really? My experience has been that anything that
> properly implements
> java.io.Serializable does just fine migrating from
> node to node. Sure,
> migrating lots of data around a cluster is
> time-consuming and perhaps
> would not be considered a best-practice, but the
> container-provided
> clustering and session sync capabilities certainly
> do work.

 Completly agree. The case is that serialization is
slow, really, really slow (at least in terms of CPU
cicles) even serializing to local disks. But no doubt
it works. What I mean is that trusting container
clustering is going to solve any clustering problem
can be a really wrong idea, mainly because the
container limits to (correct me if I'm wrong)
serialize over the network session data. If such
session data is just "a pointer" to real data, it can
work, otherwise it will miserable fail with no so big
loads.

 On the opposite clustered databases will limit to 
sync changes (maybe just a few rows amongs maybe
thousands of rows per user). Also a custom solution (a
node notifying it's peers "I changed this and this
, please update") will work much better.

> 
> I would argue that a small session footprint is
> critical to a robust web
> application, clustered or not.
> 
> | Mysql makes a great help since it use in memory
> (RAM) storage for
> | clustered tables
> 
> What are you talking about? The closest thing to
> "clustered tables" that
> MySQL supports is the FEDERATED storage engine, and
> there are no
> guarantees about RAM usage for it.

Guess we are not speaking about the same thing. I
refer to NDB Cluster engine:
 
http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster.html

 I read time ago that Google improved such engine for
its own purposes and the next Mysql will show improved
clustering stuff. Also, since Mysql is now part of Sun
I guess also it will get a boost from Solaris
engineering (I mean, Dtrace).


> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.8 (MingW32)
> Comment: Using GnuPG with Mozilla -
> http://enigmail.mozdev.org
> 
>
iEYEARECAAYFAkf6gT0ACgkQ9CaO5/Lv0PAV2wCgtSxf1Pcwi/8cXEuKsnu4EPAe
> 9hoAnir3tkn+qZ6l0pnoXhf1r4c9gVfY
> =QyZ9
> -----END PGP SIGNATURE-----
> 
>
---------------------------------------------------------------------
> To start a new topic, e-mail:
> users@tomcat.apache.org
> To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org
> 
> 


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


Re: Tomcat clustering

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

Enrique,

Enrique Arizón wrote:
| If you users sessions are simple tomcat sessions clustering will be
| enough but if you have complex session data structures (let's say for
| example a java.util.ArrayList/Hashtable) you will need custom
| solutions to sync sessions between clustered nodes.

Really? My experience has been that anything that properly implements
java.io.Serializable does just fine migrating from node to node. Sure,
migrating lots of data around a cluster is time-consuming and perhaps
would not be considered a best-practice, but the container-provided
clustering and session sync capabilities certainly do work.

I would argue that a small session footprint is critical to a robust web
application, clustered or not.

| Mysql makes a great help since it use in memory (RAM) storage for
| clustered tables

What are you talking about? The closest thing to "clustered tables" that
MySQL supports is the FEDERATED storage engine, and there are no
guarantees about RAM usage for it.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkf6gT0ACgkQ9CaO5/Lv0PAV2wCgtSxf1Pcwi/8cXEuKsnu4EPAe
9hoAnir3tkn+qZ6l0pnoXhf1r4c9gVfY
=QyZ9
-----END PGP SIGNATURE-----

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