id: cluster-config-instance title: Heron Instance sidebar_label: Heron Instance

You can configure the behavior of the Heron Instances (HIs) in a topology using the parameters below.

Internal Configuration

These parameters deal with the TCP write and read queue for each instance.

ParameterMeaningDefault
heron.instance.internal.bolt.read.queue.capacityThe queue capacity (number of items) in bolt for buffer packets to read from stream manager128
heron.instance.internal.bolt.write.queue.capacityThe queue capacity (number of items) in bolt for buffer packets to write to stream manager128
heron.instance.internal.spout.read.queue.capacityThe queue capacity (number of items) in spout for buffer packets to read from stream manager1024
heron.instance.internal.spout.write.queue.capacityThe queue capacity (number of items) in spout for buffer packets to write to stream manager128
heron.instance.internal.metrics.write.queue.capacityThe queue capacity (number of items) for metrics packets to write to metrics manager128

Network Configuration

You can configure how HIs collect and transmit data in one (but only one) of two ways: time based or size based. If you choose time based, you can specify the maximum batch time (in milliseconds) for reading from and writing to the HI's socket; if you choose size based, you can specify maximum batch sizes (in bytes) instead.

ParameterMeaningDefault
heron.instance.network.read.batch.time.msTime based, the maximum batch time in ms for instance to read from stream manager per attempt16
heron.instance.network.read.batch.size.bytesSize based, the maximum batch size in bytes to read from stream manager32768
heron.instance.network.write.batch.time.msTime based, the maximum batch time in ms for instance to write to stream manager per attempt16
heron.instance.network.write.batch.size.bytesSize based, the maximum batch size in bytes to write to stream manager32768

Other Network Parameters

The following parameters do not need to be set in accordance with a time- or size-based system.

ParameterMeaningDefault
heron.instance.network.options.socket.send.buffer.size.bytesThe maximum socket's send buffer size in bytes6553600
heron.instance.network.options.socket.received.buffer.size.bytesThe maximum socket‘s received buffer size in bytes of instance’s network options8738000
heron.instance.reconnect.streammgr.interval.secInterval in seconds to reconnect to the stream manager, including the request timeout in connecting5
heron.instance.reconnect.streammgr.timesThe maximum number of connection attempts made to the SM before the SM is forcibly restarted60

Metrics Manager Configuration

These parameters deal with how each HI interacts with the topology's Stream Manager.

ParameterMeaningDefault
heron.instance.metrics.system.sample.interval.secThe interval, in seconds, at which an instance samples its system metrics, e.g. CPU load.10
heron.instance.reconnect.metricsmgr.interval.secInterval in seconds to reconnect to the metrics manager, including the request timeout in connecting5
heron.instance.reconnect.metricsmgr.timesThe maximum number of connection attempts to the MM before the MM is forcibly restarted60

Tuning

These parameters are used to dynamically tune the available sizes in read and write queues to maintain high performance while avoiding garbage collection issues.

ParameterMeaningDefault
heron.instance.tuning.expected.bolt.read.queue.sizeThe expected size on read queue in bolt5
heron.instance.tuning.expected.bolt.write.queue.sizeThe expected size on write queue in bolt5
heron.instance.tuning.expected.spout.read.queue.sizeThe expected size on read queue in spout512
heron.instance.tuning.expected.spout.write.queue.sizeThe expected size on write queue in spout5
heron.instance.tuning.expected.metrics.write.queue.sizeThe expected size on metrics write queue5
heron.instance.tuning.current.sample.weightTODO0.8

Other Parameters

ParameterMeaningDefault
heron.instance.set.data.tuple.capacityThe maximum number of data tuples to batch in a HeronDataTupleSet protobuf message256
heron.instance.set.control.tuple.capacityThe maximum number of control tuples to batch in a HeronControlTupleSet protobuf message256
heron.instance.ack.batch.time.msThe maximum time in ms for an spout to do acknowledgement per attempt, the ack batch could also break if there are no more ack tuples to process128
heron.instance.emit.batch.time.msThe maximum time in ms for an spout instance to emit tuples per attempt16
heron.instance.emit.batch.size.bytesThe maximum batch size in bytes for an spout to emit tuples per attempt32768
heron.instance.execute.batch.time.msThe maximum time in ms for an bolt instance to execute tuples per attempt16
heron.instance.execute.batch.size.bytesThe maximum batch size in bytes for an bolt instance to execute tuples per attempt32768
heron.instance.state.check.interval.secThe time interval for an instance to check the state change, for instance, the interval a spout using to check whether activate/deactivate is invoked5
heron.instance.acknowledgement.nbucketsTODO10