This document outlines a proposal to integrate JMX Management into Netty 4.
Global Options and Configuration
These items are general issues to consider in the global configuration and deployment of Netty component MBeans.
- Netty MBean domain namespace.
- JMX Domain[s] (MBeanServer[s]) to register with.
- Verbosity of JMX Management Interfaces
- Optional categories of Netty components to register management interfaces for.
- Relative level of information for each category of MBean. For example:
Low: Configuration only.
- Medium: Activity, events and volume.
- High: Instrumented activity (operation elapsed time, CPU time, waits, blocks, bytes transferred etc.)
- Stale MBean instance age-out. i.e. In cases where an MBean is created for the management of a transient Netty component such as a Channel, and an MBean for that component is registered when the component is created [or connected] but it may be desirable that the MBean remain accessible for some lingering time after the component is closed so that a user can inspect it. Eventually, in the absence of any direct JMX interfaction with the MBean, it should be aged out and be unregistered.
- Standardized JMX ObjectName patterns per component type:
- Useful identifying key property names and values.
- Sufficient granularity of key property names and values to avoid ObjectName collision between MBeans created for two legitimatelly components.
Proposed Requirements and Implementation
- Netty Code Base Internalized JMX Code to avoid additional library dependencies.
- Enumerate potental extensions to Netty core classes to allow JMX supporting hooks into core class instances.
- JMX Annotations to provide runtime meta-data and discovery of extended attributes and annotations.
- MBeans implemented as DynamicMBeans rather than simple MBeans:
- Supports useful and informative meta-data.
- Allows dynamic upgrade/downgrade of verbosity/granularity by adding/removing attributes.
Managed Netty Components (Rough and Speculative)
Verbose or Extended Options
Interest Ops (Rendered)
Pipeline Handler Names
Child Channel ObjectNames
Parent Channel ObjectName
Add to Pipeline
Remove from Pipeline
Aggregate Channel Stats
Same as Channel
|Executors / Thread Pools|
Thread Stats For Pool Threads
For All Contained Handlers