I
have been working on a number projects that involved deploying infrastructure
to the Amazon EC2 Cloud. For those you of you that do have a life (shame on
you, remember in school, the Turincratic oath, you shall not have a life
outside of your work? Dating is a NP-incomplete problem? Anyone? I am starting to believe that was a
practical joke somebody played on me) and do something else except Software,
here is a link that explains EC2 http://www.amazon.com/gp/browse.html?node=201590011
.
The
problem with deploying clusters in EC2 is that multicasting is not enabled in
the EC2 network. This means that JGroups will not work by default in the Cloud,
which in turns means that JBoss Clustering will not work either. There is
plenty of debate of why Amazon does not allow multicasting and what they can do
to fix it. Until Amazon enables multicasting this is what you need to set up a
JBoss cluster:
Start
a Gossip Server:
java
org.jgroups.stack.GossipRouter -port 5555 -bindaddress localhost
Then
in the JGroups configuration of the file %JBOSS_HOME/server/all/deploy/cluster-service
make the following modifications in all nodes of the cluster:
<UDP ip_mcast="false" mcast_addr="224.0.0.35" mcast_port="45566" ip_ttl="32"
mcast_send_buf_size="150000" mcast_recv_buf_size="80000"/>
<PING gossip_host="gossip_server_name" gossip_port="5555"
gossip_refresh="15000" timeout="2000" num_initial_members="3"/>
Now,
instead of nodes multicasting to find other nodes, they will register and get
information about the cluster from the gossip server. This brings one interest
point. The gossip server is a single point of failure. Therefore UDP gossip multicasting will not
work for a solution that does not permit single points of failure. The solution
is then to use TCP Gossiping.
To
enable TCP Gossiping you start Gossip Servers in various nodes. Then in the same file as before you make this
change in all the nodes of the cluster:
<TCPGOSSIP initial_hosts="gossip_server1[5555],gossip_server2[5556]"
gossip_refresh_rate="10000" num_initial_members="3" />
You also need to disable other types of multicasting in that configuration
file. gossip_server1 and gossip_server2 are the servers where you started the
gossip server and 5555 and 5556 are the respective ports.
There is one more strategy you could try and it involves configuring J
Groups to use TCP ping. With TCP ping you don’t need to start Gossip Servers. The tradeoff here
is that you assign the JVM of a few nodes to handle the extra Gossip Server load, but it is easier
to maintain since you don’t have start another process. Here is how to you configure the nodes
in cluster-service.xml:
<TCP start_port="7800" />
<TCPPING initial_hosts="HostA[7800],HostB[7800]" port_range="5" timeout="3000"
num_initial_members="3" />
HostA and HostB are your designed Gossip Servers.
For more information take a look at the relevant JGroups documentation at
http://www.jgroups.org/javagroupsnew/docs/manual/html/user-advanced.html .
Hi Hugo,
Thanks for the nice post :-) I have been trying to setup JBoss cluster on EC2 and got stuck at multicasting.Your post helped me moving forward...
But, I couldn't finish the setup yet... I followed teh steps mentioned in the post but, the nodes are not discovered yet.
On both the nodes I'm getting following error...
------------
14:41:34,926 ERROR [GossipClient] exception connecting to host 10.254.163.159:5556
....
...
14:39:49,611 ERROR [GossipClient] exception connecting to host 10.255.199.176:5555
--------
I started Gossip server on 10.255.199.176 at 5555
On
10.254.163.159 at 5556
Am I missing anything?
Any pointers would be highly appreciated.
Thanks,
Suresh
Posted by: sureshrk19 | April 08, 2009 at 11:46 AM
That was indeed a good post and will be helpful for Jee deployments.
I have a doubt regarding deploying web applications in Cloud (any). How will be the communication between the application server (say JBoss) and the database server (MySql) of a web application in the following cases.
Case 1: The whole application in the cloud.
Case 2: The database alone in the cloud.
Any reply would be highly appreciated.
Thanks in advance.
Posted by: shibyniju | May 05, 2009 at 12:43 AM
Thanks for all information . I'm very interesting in your blog please send any update
Posted by: invierta proyectos | February 13, 2010 at 10:23 AM
This is a very good article, I just accidentally adidas shoes there to see this, thank you, the next to go find the cheap pump and wooden crafts ' news .http://www.jerseystown.com
Posted by: cheap jerseys | June 05, 2010 at 01:20 AM
Amazon EC2’s simple web service interface allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment.
http://faris.eu
Posted by: Technology News | July 21, 2010 at 06:13 AM
hey buddy,this is one of the best posts that I’ve ever seen; you may include some more ideas in the same theme. I’m still waiting for some interesting thoughts from your side in your next post.
Posted by: cheap jerseys | August 17, 2010 at 08:03 PM
Colors are specific to the carriers because carriers request those colors are specific to them. Its called differentiation, look it up.So this is the reason why we say that sherry starts when other wines finish.By the way, what is your view about amontillado sherry? This is my favourite! I love the complexity that both ageing processes give it.link my name to see my website now,thanks.
Posted by: Retro Jordan | October 13, 2010 at 12:12 AM
This is a very good article, I just accidentally adidas shoes there to see this, thank you, the next to go find the cheap pump and wooden crafts ' news
Posted by: baclofen | October 13, 2010 at 05:38 AM
Connectivity is changing how information is created and distributed and conversations between consumers build brands more than communication strategies do
Posted by: cheap viagra | October 18, 2010 at 09:30 PM
Originally in this post shows a video of a family of Masachussets, whose father has been jailed for reporting that her son 5 years you were teaching that there are "straight families and gay families
Posted by: cialis online | October 19, 2010 at 06:10 PM
Growing old is not upsetting; being perceived as old is.
Posted by: christian louboutin | November 07, 2010 at 06:44 PM
GOOD LUCK!
Posted by: taobao buy | November 11, 2010 at 06:30 PM
Blessed be God, the Father of Christ Jesus our Lord, who in Christ has blessed us from heaven with every spiritual blessing.
Posted by: Air Jordan Shoes | November 11, 2010 at 10:23 PM
That's not his. Steve's is black*_*
Posted by: air jordan | November 16, 2010 at 05:17 PM
hey buddy,this is one of the best posts that I’ve ever seen; you may include some more ideas in the same theme. I’m still waiting for some interesting thoughts from your side in your next post.
Posted by: UGG UK | November 18, 2010 at 08:44 AM
hy everyone...
hope you all well....
i have just sign up into your blog and its my 1st comment to u....
dear your blog is very beautiful and all the things are very informative and well arranged....
i m here to tell u about CODEINE ,which is a pain killer....
i m sure you will definitely want to know abt it...
so plz visit this site...
http://www.mycarepharmacy.com/buy_online/morphinan/codeine
Read more: http://blog.guykawasaki.com/2007/12/hometips-theres.html#ixzz16UNgYTFp
Posted by: mishael aarons | November 27, 2010 at 05:35 AM
hy everyone...
hope you all well....
i have just sign up into your blog and its my 1st comment to u....
dear your blog is very beautiful and all the things are very informative and well arranged....
i m here to tell u about CODEINE ,which is a pain killer....
i m sure you will definitely want to know abt it...
so plz visit this site...
Posted by: mishaelaarons | November 30, 2010 at 02:40 AM
E ai gostaram, muito fácil não é!?Eu achei.
Vocês podem utilizar qualquer vermelho – como eu disse na montagem – mas só não usem os vermelhos que puxam para o laranja. Outras opções são: Love (Risqué), Morango Silvestre (Colorama), Ipanema (Ana Hickmann), Coque (Risqué) … vermelho é o que não falta nas prateleiras!
Posted by: Louis Vuitton Handbags | December 02, 2010 at 10:45 PM
I would like to thank you for sharing this great information with us. I am really glad to learn about this because it helps me to increase my knowledge.
Posted by: order generic lipitor | December 16, 2010 at 11:16 PM
Heather, je pouvais vraiment besoin de votre aide. J'ai demandé de l'aide typepad à plusieurs reprises. Ils m'envoient le même écrit tutoriel et je ne peux pas semblé pour l'obtenir. S'il vous plaît envoyez-moi votre email et je serai ravi de vous engager pour une aide supplémentaire avec mon blog au travers de Typepad.
Posted by: Air Jordan Shoes | December 24, 2010 at 12:58 AM
We must confront future with optimism。
Posted by: wholesale electronics gadgets | December 27, 2010 at 09:44 PM
*Learn to live, and live to learn.
Posted by: china wholesale store | December 31, 2010 at 01:23 AM
* be happy together is good enough. I am not asking for things that I could never get.
Posted by: Taobao English | January 21, 2011 at 04:25 PM
Hola,
Ha hecho un trabajo muy bueno. Hay muchas personas en busca de eso ahora van a encontrar suficientes fuentes por tus consejos.
espera para obtener más consejos acerca de que
Posted by: Generic Cialis | March 06, 2011 at 11:14 PM
Wow, Great postNice work, I would like to read your blog every day Thanks
Posted by: アンカロン | April 18, 2011 at 05:41 AM