Archived

This forum has been archived. Please start a new discussion on GitHub.

about IcePack & load balancing

As a new user, I am confused by deployment problems:
-Does Ice supports load balancing? How?
-I need a standalone IceRegistry server and a group of servers to offer service, started by icepacknode on several different hosts, how to achieve this?
-Could anyone post a sample deployment view of load balanced application?

Thanks in advance!

Comments

  • also, i want to know the purpose for using "IcePack registry configuration" section for icepack node.

    Thanks again.
  • benoit
    benoit Rennes, France
    Re: about IcePack & load balancing
    Originally posted by Binary
    As a new user, I am confused by deployment problems:
    -Does Ice supports load balancing? How?

    Ice and IcePack supports several form of load balancing:
    • You can specify multiple endpoints in a proxy. When the connection is established, the Ice runtime will pick a random endpoint and will connect to this endpoint to send the request to the object.
    • You can use the IcePack::Query interface to lookup a service by type and pickup a random deployed service.

    -I need a standalone IceRegistry server and a group of servers to offer service, started by icepacknode on several different hosts, how to achieve this?

    You would deploy an IcePack registry on a given host and an IcePack node on each host. You then deploy your group of servers on the different IcePack nodes. Please have a look at the manual for more information on the IcePack deployment mechanism.


    -Could anyone post a sample deployment view of load balanced application?


    You could have a look at the simple and hello demo in the Ice-1.5.1/demo/IcePack directory.

    I'm not sure I understand your last question about the purpose of using "IcePack registry configuration". Are you refering to collocating the IcePack registry with the IcePack node?
    Collocating the registry with the node is simply a convenience to avoid having to start 2 processes. This is useful for the demos for example.

    Benoit.

  • You would deploy an IcePack registry on a given host and an IcePack node on each host. You then deploy your group of servers on the different IcePack nodes. Please have a look at the manual for more information on the IcePack deployment mechanism.

    Thanks a lot!
    I have tried that, but encounted several problems.
    My operation steps:

    1. run "icepackregistry --Ice.Config=config_registry" at host 10.1.1.1 as registry server, registry is as following:

    #
    # IcePack registry configuration.
    #
    IcePack.Registry.Client.Endpoints=default -p 12000
    IcePack.Registry.Server.Endpoints=default
    #IcePack.Registry.Internal.Endpoints=default
    IcePack.Registry.Admin.Endpoints=default
    IcePack.Registry.Data=db/registry


    2. run "icepacknode --Ice.Config=config_node" at host 10.1.1.2 as node01, config_node as following:

    #
    # The IcePack locator proxy.
    #
    Ice.Default.Locator=IcePack/Locator:default -h 10.1.1.1 -p 12000

    #
    # IcePack registry configuration.
    #
    IcePack.Registry.Client.Endpoints=default -p 12000
    IcePack.Registry.Server.Endpoints=default
    IcePack.Registry.Internal.Endpoints=default
    IcePack.Registry.Admin.Endpoints=default
    IcePack.Registry.Data=db/registry

    #
    # IcePack node configuration.
    #
    IcePack.Node.Name=node01
    IcePack.Node.Endpoints=default
    IcePack.Node.Data=db/node01
    IcePack.Node.CollocateRegistry=1
    #IcePack.Node.Output=db


    #
    # Trace properties.
    #
    IcePack.Node.Trace.Activator=3
    IcePack.Node.Trace.Adapter=2
    IcePack.Node.Trace.Server=3


    3. run "icepacknode --Ice.Config=config_node" at host 10.1.1.3 as node 02, config_node as following:

    #
    # The IcePack locator proxy.
    #
    Ice.Default.Locator=IcePack/Locator:default -h 10.1.1.1 -p 12000

    #
    # IcePack registry configuration.
    #
    IcePack.Registry.Client.Endpoints=default -p 12000
    IcePack.Registry.Server.Endpoints=default
    IcePack.Registry.Internal.Endpoints=default
    IcePack.Registry.Admin.Endpoints=default
    IcePack.Registry.Data=db/registry

    #
    # IcePack node configuration.
    #
    IcePack.Node.Name=node02
    IcePack.Node.Endpoints=default
    IcePack.Node.Data=db/node02
    IcePack.Node.CollocateRegistry=1
    #IcePack.Node.Output=db


    #
    # Trace properties.
    #
    IcePack.Node.Trace.Activator=3
    IcePack.Node.Trace.Adapter=2
    IcePack.Node.Trace.Server=3



    4. run "icepackadmin --Ice.Config=config_admin" at host 10.1.1.4 as admin console, config_admin as following:

    #
    # The IcePack locator proxy.
    #
    #Ice.Default.Locator=IcePack/Locator:default -p 12000
    Ice.Default.Locator=IcePack/Locator:default -h 10.1.1.1 -p 12000

    #
    # Trace properties.
    #
    IcePack.Node.Trace.Activator=3
    IcePack.Node.Trace.Adapter=2
    IcePack.Node.Trace.Server=3

    on the prompt, type "node list" but nothing found.

    I tried replace "Ice.Default.Locator=IcePack/Locator:default -h 10.1.1.1 -p 12000" in config_admin to "... -h 10.1.1.2 ..."/"... -h 10.1.1.3 ..." then i can see node01/node02.
    And I can't deploy application contain nodes 01/02 because I can't see both nodes at the same time.
    So I want to know:

    a. Must I run icepackadmin using different "Ice.Default.Locator=IcePack/Locator" config for different hosts?
    b. How to config each node so I can list all nodes via registry server?


    Thanks!
  • I'm not sure I understand your last question about the purpose of using "IcePack registry configuration". Are you refering to collocating the IcePack registry with the IcePack node?
    Collocating the registry with the node is simply a convenience to avoid having to start 2 processes. This is useful for the demos for example.

    I just want to seprate registry and node because i've already defined a seprete registry server, but when i comment out the registry section in node config file, icepacknode always show error:

    icepacknode: error: service caught unhandled Ice exception:
    .\PropertiesI.cpp:490: Ice::SyscallException:
    syscall exception: The system cannot find the file specified.


    Thanks again!
  • benoit
    benoit Rennes, France
    Hi,

    You don't need the IcePack.Registry.* properties in the node configuration files and since you're running a separate registry you shouldn't set the IcePack.Node.CollocateRegistry prooperty. In the registry configuration file, you need to enable the internal endpoints (otherwise the nodes won't be able to the connect to the registry).

    So for your registry, you should use this configuration file:
    #
    # IcePack registry configuration.
    #
    IcePack.Registry.Client.Endpoints=default -p 12000 -h 10.1.1.1
    IcePack.Registry.Server.Endpoints=default -h 10.1.1.1
    IcePack.Registry.Internal.Endpoints=default -h 10.1.1.1
    IcePack.Registry.Admin.Endpoints=default -h 10.1.1.1
    IcePack.Registry.Data=db/registry
    

    For your nodes:
    #
    # The IcePack locator proxy.
    #
    Ice.Default.Locator=IcePack/Locator:default -h 10.1.1.1 -p 12000
    
    #
    # IcePack node configuration.
    #
    IcePack.Node.Name=node01
    IcePack.Node.Endpoints=default -h 10.1.1.2
    IcePack.Node.Data=db/node01
    #IcePack.Node.Output=db
    
    
    #
    # Trace properties.
    #
    IcePack.Node.Trace.Activator=3
    IcePack.Node.Trace.Adapter=2
    IcePack.Node.Trace.Server=3
    

    Note that I've added the -h 10.1.1.x option to the each endpoint property. It's to make sure that the service will listen on the 10.1.1.x interface (it might not be necessary if the default interface is 10.1.1.x).

    Let me know if you still have problems after using this configuration!

    Benoit.
  • It works! Thanks Benoit! Thanks ZeroC!

    But I encounted icebox assertion failed problem on windows platform:
    Program:D:\Ice-1.5.1\bin\icebox.exe
    File:dbgdel.cpp
    Line:52

    Expression:_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
    ...

    Also, one server adapter can't be activated:
    "[ icepacknode: Adapter: server adapter Srvernode02.Hello_Servernode02' activation timed out ]"

    I will try it on linux then.
  • config files in above sample, hope to be helpful.
    needs "D:\Ice-1.5.1\demo\IcePack\simple\server.exe".
  • Originally posted by Binary
    But I encounted icebox assertion failed problem on windows platform:
    Program:D:\Ice-1.5.1\bin\icebox.exe
    File:dbgdel.cpp
    Line:52

    Expression:_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
    ...

    What is the complete stack trace? One of the most common mistakes that leads to such failures is to mix debug with release libraries. For example, if IceBox was compiled in release mode, then the services it loads as DLLs must be compiled in release mode as well.
  • bernard
    bernard Jupiter, FL
    The binary distributions for Windows install the debug (/MDd) icebox.exe in <root>/bin/debug.

    Cheers,
    Bernard
  • What is the complete stack trace? One of the most common mistakes that leads to such failures is to mix debug with release libraries. For example, if IceBox was compiled in release mode, then the services it loads as DLLs must be compiled in release mode as well

    yes, it works well after I recompile service.dll in release mode.

    Thanks!