GAS requests
The secret to load balancing GAS requests involves equally dispatching the requests between the different GAS instances.
However, all requests are not the same. Some requests must go to a specific GAS instance. These requests can be recognized through the session identifier that is part of their URL. The session identifier represents a GAS session, and because a GAS session is known by a single GAS instance only, all requests that are relative to that session must be driven to that specific GAS instance.
Session-bound requests that share the same session identifier are part of a specific GAS session. Of the various kinds of GAS applications, only two create a session: GDC and GWC applications. Since GWS applications don't create sessions, GWS requests can always be routed to any of the available GAS instances. Sites that serve only GWS applications do not have to deal with session-bound request issues. However, if a site serves all kind of applications, it must be configured to serve session-bound requests only.
Managing the load balancing means handling the two types of requests:
- Load balancing sessionless requests among several GAS instances.
- Driving session-bound requests to the GAS instance that handles the session.