Configuration option to disable presence broadcast for other resources on single user


This feature works around a specific use case related to how Openfire manages presence notification and automatically keeps peer resources of a given user up-to-date with any and all changes to presence of any other resource for the given user. If a user has a sufficiently large number of resources, e.g. a few thousand clients running as single user with different resources, one can cripple the Openfire server, induce crazy memory usage, garbage collection and network traffic, including crazy memory usage on the clients as all parties try to handle very large presence packets containing an entry per resource which change any time a resource changes state.

This feature works around the issue by giving an optional system property in Opefire which lets you specifically disable presence notification for this edge case.




Guus der Kinderen
February 6, 2014, 9:19 PM

The patch was applied to trunk. Flow raised some concern regarding having the property check in a code path that is executed a lot. Perhaps we could optimize by caching the value temporarily - but for now, let's first see if it'd actually would introduce a notable overhead.

Benjamin Sherman
February 6, 2014, 8:16 PM

I should note, this patch has been running on an instance of OF 3.8.1 for internal automation at Jive Software for nearly one year. We were testing on 3.8.0 before that. We had up to 10,000 smack clients running all as the same user with different resources.

Note: we have since changed to using individual XMPP users for each smack client as this generally is the better path to follow.



Guus der Kinderen


Benjamin Sherman