Home Help Center

Grid and connections

bambukbambuk Member Alex StovbounOrganization: UBS AGProject: Financial applications
Two question on grid environment:

1. Say an ice object is provided by an adapter member of a replica group. In my client I have a proxy to this object. The server that the proxy was connected to goes down. Will the proxy automatically obtain another connection to another adapter in the replica group?

2. ACM closed proxy's connection due to period of inactivity. When activity resumes, will the proxy be reconnected to the same adapter in the replica group?

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    bambuk wrote: »
    Two question on grid environment:

    1. Say an ice object is provided by an adapter member of a replica group. In my client I have a proxy to this object. The server that the proxy was connected to goes down. Will the proxy automatically obtain another connection to another adapter in the replica group?

    Yes. Note however that if the server crashes while the client is invoking on the proxy to your replicated object, the invocation might not be automatically retried if the method is not idempotent (to not break at-most-once semantics).
    2. ACM closed proxy's connection due to period of inactivity. When activity resumes, will the proxy be reconnected to the same adapter in the replica group?

    It depends on the endpoints for the proxy which are cached by the Ice runtime once retrieved from the locator. If only one endpoint is retrieved by the Ice runtime from the locator then the Ice runtime will re-connect to this endpoint and therefore to the same adapter in the replica group.

    However, if multiple endpoints were returned for the replica group, the Ice runtime might connect to another adapter from the replica group. You can configure how many endpoints are returned for a replica group with the "n-replicas" attribute of the replica group load balancing descriptor, see here for more information.

    Note also that the cached endpoints might expire if you use a proxy configured with ice_locatorCacheTimeout. In this case, new endpoints might be retrieved from the locator and your client might therefore connect to another replica if it needs to establish a new connection.

    Let me know if you need more information!

    Cheers,
    Benoit.
Sign In or Register to comment.