Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 10-22-2008
Matthieu Matthieu is offline
Registered User
 
Name: Matthieu Reisz
Organization: INSA Rennes
Project: communication beetween picture's lib
 
Join Date: Oct 2008
Posts: 13
IceGrid and load balancing

I try to run an IceGrid application with load balancing...

That's why I did two servers (in java) which have a single object (affpoint).

The two servers are located in two differents directory, are called both "Serverpoint.class"; I create the directory db, db/Registry, db/Node1, db/node3 for icegrid service.

I put in my XML file :
- a replica-group
<replica-group id="Raffpoint">
<load-balancing type="adaptive" load-sample="5" n-replicas="2"/>
<object identity="affpoint" type=":emo::Caracteristique"/>
</replica-group>


- a server template
<server-template id="affpointTemplate">
<parameter name="index"/>
<parameter name="exepath" default="java"/>
<server id="AffpointServer${index}" exe="${exepath}" activation="on-demand">
<option>Serverpoint</option>
<property name="Ice.MessageSizeMax" value="1000000000"/>
<adapter name="Aaffpoint" endpoints="tcp" register-process="true" replica-group="Raffpoint"/>
</server>
</server-template>


- two nodes with the two server-instances
<node name="Node1">
<server-instance template="affpointTemplate" index="2"/>
</node>

<node name="node3">
<server-instance template="affpointTemplate" index="1"/>
</node>


I associate the XML file to the IceGrid service with :
icegridadmin --Ice.Config=IceGrid\config.grid -e "application add ..\application_load_bal.xml"

I run the two servers with :
icegridnode --Ice.Config=config.host1
icegridnode --Ice.Config=config.host2



When I try to use the object affpoint with a client, the server on node3 answer and execute the request. If I shut down this server, the object is no more available, even if the server on node1 is running...

Other questions : are the server-template absolutely necessary in order to do load-balancing ?

Thank you for your help !
Matthieu
Reply With Quote
  #2 (permalink)  
Old 10-22-2008
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,564
Hi Matthieu,

Are you sure the node name from the XML descriptor matches the one in the icegridnode configuration file? For instance, do you use "node1" or "Node1" (as specified in the XML) in the configuration file of the IceGrid node?

If you don't want to use server templates you can just use server descriptors in the XML deployment descriptors (<server> XML element). Or are you asking if it's possible to use replica groups without XML descriptors? That's also possible when using dynamic registration but it's more limited (only random load balancing is possible). See Michi's article for more information on dynamic registration here: Teach Yourself IceGrid in 10 Minutes or here in the Ice manual.

Cheers,
Benoit.
Reply With Quote
  #3 (permalink)  
Old 10-23-2008
Matthieu Matthieu is offline
Registered User
 
Name: Matthieu Reisz
Organization: INSA Rennes
Project: communication beetween picture's lib
 
Join Date: Oct 2008
Posts: 13
Right !!
It was a problem with the node name... Thank you, it works now !

Thank you for the articles !

About my question : it is possible to do load-balancing beetween objects without define them in <server-instance> configured by <serveur-template> ?

Cheers,
Matthieu
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
IceGrid Replication and load balancing per function invocation spsoni Help Center 1 08-12-2008 03:37 AM
Glacier2, IceGrid, and Load Balancing seth Help Center 15 11-06-2006 12:03 PM
question about load-balancing canyoudink Help Center 5 10-20-2006 06:43 AM
About load balancing ganzuoni Comments 3 12-07-2005 08:15 AM
Load Balancing ganzuoni Help Center 8 06-20-2003 07:07 PM


All times are GMT -4. The time now is 05:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.