Spotlight on GlassFish 4.1: #7 WebSocket Session Throttling and JMX Monitoring

Posted by delabassee on Oracle Blogs See other posts from Oracle Blogs or by delabassee
Published on Thu, 21 Aug 2014 07:30:31 +0000 Indexed on 2014/08/21 10:25 UTC
Read the original article Hit count: 286

Filed under:

'Spotlight on GlassFish 4.1' is a series of posts that highlights specific enhancements of the upcoming GlassFish 4.1 release. It could be a new feature, a fix, a behavior change, a tip, etc.

#7 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.

JMX Monitoring:

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
  • 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

Session Throttling

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 endpoint
  • per remote endpoint address (client IP address)

 

For more details, check Tyrus Session Throttling.

The next entry will focus on Tyrus new clients-side features.

© Oracle Blogs or respective owner

Related posts about /GlassFish