---
title: "IceGrid and Glacier2 Integration"
url: https://docs.zeroc.com/ice/3.8/services/glacier2/icegrid-and-glacier2-integration
docs_index: https://docs.zeroc.com/llms.txt
---

> For an index of every page, see [llms.txt](https://docs.zeroc.com/llms.txt).

# IceGrid and Glacier2 Integration

[IceGrid](https://docs.zeroc.com/ice/3.8/services/icegrid.md) is a server activation and location service. This section describes the ways in which you can integrate Glacier2 and IceGrid.

## Configuring Router Clients for IceGrid

It is not uncommon for a Glacier2 client to require access to a locator service such as IceGrid. In the absence of Glacier2, a locator client would typically define the property [Ice.Default.Locator](https://docs.zeroc.com/ice/3.8/property-reference/ice-default-properties.md#ice.default.locator) with a stringified proxy for the [locator service](https://docs.zeroc.com/ice/3.8/services/icegrid/getting-started-with-icegrid.md). However, when that locator service is accessed via a Glacier2 router, the configuration requirements are slightly different. It is no longer necessary for the client's configuration to include `Ice.Default.Locator`; this property must be defined in the router's configuration instead.

For example, consider the following network architecture:

![The client at 10.0.0.1 uses a bidirectional connection to Glacier2 client endpoints at 1.2.3.4. Glacier2 server endpoints use 10.0.0.1. Glacier2 and the IceGrid registry at 10.0.0.2 port 4061 use separate request and callback connections.](https://docs.zeroc.com/images/ice/3.8/icegrid-and-glacier2-integration/router-configuration.svg)

In this case the Glacier2 router's configuration must include the property shown below:

```config
Ice.Default.Locator=IceGrid/Locator:tcp -h 10.0.0.2 -p 4061
```

## Using Replicated Session Managers

An IceGrid application might want to use [replication](https://docs.zeroc.com/ice/3.8/services/icegrid/object-adapter-replication.md) to increase the availability of Glacier2 session managers. When you configure an indirect proxy for a session manager (and [configure Glacier2 with a locator proxy](#configuring-router-clients-for-icegrid)), the Ice runtime in the router queries the locator to obtain a proxy for a session manager replica.

By default, this proxy is cached for 10 minutes, meaning the router uses the same session manager proxy to create sessions for a 10-minute period, after which it queries the locator again. If you want to distribute the session-creation load among the session manager replicas more evenly, you can decrease the locator cache timeout using configuration properties.

For example, the following settings use a timeout of 30 seconds:

```config
Glacier2.SessionManager.LocatorCacheTimeout=30
Glacier2.SSLSessionManager.LocatorCacheTimeout=30
```

As you can see, timeouts are specified individually for the `SessionManager` and `SSLSessionManager` proxies. You can also disable caching completely by using a value of `0`, in which case the router queries the locator before every invocation on a session manager. See the discussion of [session management](https://docs.zeroc.com/ice/3.8/services/glacier2/glacier2-session-management.md) for more details.

## See Also

- [IceGrid](https://docs.zeroc.com/ice/3.8/services/icegrid.md)
- [Glacier2 Session Management](https://docs.zeroc.com/ice/3.8/services/glacier2/glacier2-session-management.md)
- [Getting Started with IceGrid](https://docs.zeroc.com/ice/3.8/services/icegrid/getting-started-with-icegrid.md)
- [Object Adapter Replication](https://docs.zeroc.com/ice/3.8/services/icegrid/object-adapter-replication.md)
