WebSocket Session Throttling and JMX Monitoring
GlassFish 4.1 embeds Tyrus 1.8.1 which is compliant with the Maintenance Release of JSR 356 (“WebSocket API 1.1”). This release also brings brings additional features to the WebSocket support in GlassFish.
Tyrus now exposes WebSocket metrics through JMX . In GF 4.1, the following message statistics are monitored for both sent and received messages:
messages count per second
average message size
smallest message size
largest message size
Those statistics are collected independently of the message type (global count) and per specific message type (text, binary and control message). In GF 4.1, Tyrus also monitors, and exposes through JMX, errors at the application and endpoint level.
For more information, please check Tyrus JMX Monitoring.
To preserve resources on the server hosting websocket endpoints, Tyrus now offers ways to limit the number of open sessions. Those limits can be configured at different level:
per whole application
per remote endpoint address (client IP address)
For more details, check Tyrus Session Throttling.
Originaly posted on The Aquarium blog.