What is client reaping?

AMPS is implemented as a set of interconnected components that operate relatively independently.

An individual client object can be referenced in many components (it is a reference counted object). When a client disconnects, each component is notified about the disconnect and is required to remove any reference to the client.

However, because the components operate independently, it is not deterministic as to when a component has processed the disconnect for a given client. Therefore, each disconnected client is placed into a reaper list and AMPS processes reaper list at least once every 5 seconds. When all references to a client have been removed then the client can be removed from the system (e.g. there are no components that can refer to it at this point).

AMPS logs warnings when a client has been on the reaper list for longer than a specific threshold. This indicates that one or more of the components that have a reference to the client is taking longer than expected to release the client, which can be an indicator of high overall load on the system.

Last updated