Rest API sessions endpoint slow

We are using the REST API plugin to get sessions. We usually have > 10k clients connected at the same time, and the first call (where the cache is “cold”) to the sessions endpoint take ~30 mins. Subsequent calls take much less time.
We have looked at the logs for a cause for this, and the most likely culprit is the reverse DNS calls which resolves the hostname from the client. The logs indicate that these sometimes time out which is probably why the whole call to the REST API is slow. For our use-case we have no need for a resolved host name, would it be possible to speed this up? Either by sending a query string to the REST API to skip reverse DNS resolution or by some configuration value that does the same thing.

Hi Johan,

That seems like a sensible improvement. I have created a new ticket for this at Add option to endpoints that retrieve sessions to skip hostname lookup · Issue #107 · igniterealtime/openfire-restAPI-plugin · GitHub