Archived

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

Locator cache and Glacier2

Hi I noticed a different behavior in Glacier's locator cache in 3.3.1 and 3.4 beta.

So I deploy a service in 2 nodes (replicated service).

Glacier2's Ice.Default.LocatorCacheTimeout is set to 0 meaning that caching is disabled.

In 3.3.1, when a client gets a hold of the service proxy thru Glacier, it keeps the proxy, it keeps using the same endpoint throughout the life of the client. All requests are sent to the same instance of the service.

In 3.4 beta, I noticed that after some time (probably about a couple of minutes) requests get alternated from one instance of the service to the other one.

None of my ice properties change between the 2 versions.

Is this change in behavior expected?

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Active connection management is now enabled with Glacier2. This could explain this change. If the connection to the replica is inactive for 1 minute, it is closed by ACM. When a request comes in from a client, the connection is re-established to one of the replica. You should be able to confirm this by enabling network tracing on Glacier2 (with Ice.Trace.Network=2) and see if the connection to the replica is being closed and then re-established.

    Cheers,
    Benoit.
  • Hi Benoit,

    You are right. That appears to be the case.

    I set Ice.ACM.Client=0 for Glacier2 and I don't see the connections getting closed.

    What is Glacier2.Client.ACM property for? The value is set to 120 and this appears as one of the properties under Runtime Status. I don't see this under the Configuration properties and I'm not specifying it.

    So clients of Glacier2 still has to set its Ice.ACM.Client to 0 correct?

    Do you have any recommendation for ACM in general? For example should the client ACM on Glacier2 be turned on or off?

    Thanks
    Budyanto
  • benoit
    benoit Rennes, France
    Hi,

    Glacier2.Client.ACM is the ACM setting for the Glacier2 client object adapter (it only affects connections between clients and Glacier2 but not connections between Glacier2 and backend servers). It is set by Glacier2 to twice the session timeout. This setting ensures that client connections are closed in cases where the client doesn't close the connection gracefully and the TCP/IP stack doesn't detect the connection loss in a timely manner (this can happen if the client crashes for example).

    Whether or not to disable client ACM for Glacier2 is up to you. This setting will only have an effect on connections from Glacier2 to back-end servers. It's in general a good idea to leave ACM turned on to minimize resource consumption. However, if your Glacier2 router establishes only a limited number of connections to back-end servers, it's also fine to turn it off.

    Cheers,
    Benoit.