This fix adds sandesh systemlog message throttling support.
We are throttling the message on the send side with a circular
buffer of certail value. The size of the buffer would be the
messages/second that can be sent by the application.
If application sends more messages than the configured rate,
it will be dropped and a syslog message is recorded for each
overshoot.Following logic is added in the send part for both
c++ and python:
1. Record the current time in curr_time
2. If CB is full:
2.1. Compare time of the next free buffer with current time
2.2. If difference is more than a sec, then enque else drop
3. enqueue in CB
Currently the CB size cannot be changed midway
Partial-Bug: 1469414
Reviewed: https:/ /review. opencontrail. org/19150 github. org/Juniper/ contrail- sandesh/ commit/ b8c702a89d13881 e93b9e215ae3585 3216b039d7
Committed: http://
Submitter: Zuul
Branch: R2.21.x
commit b8c702a89d13881 e93b9e215ae3585 3216b039d7
Author: arvindvis <email address hidden>
Date: Tue Aug 18 15:45:54 2015 -0700
This fix adds sandesh systemlog message throttling support.
We are throttling the message on the send side with a circular
buffer of certail value. The size of the buffer would be the
messages/second that can be sent by the application.
If application sends more messages than the configured rate,
it will be dropped and a syslog message is recorded for each
overshoot.Following logic is added in the send part for both
c++ and python:
1. Record the current time in curr_time
2. If CB is full:
2.1. Compare time of the next free buffer with current time
2.2. If difference is more than a sec, then enque else drop
3. enqueue in CB
Currently the CB size cannot be changed midway
Partial-Bug: 1469414
Conflicts: common/ sandesh. sandesh common/ sandesh_ uve.sandesh cpp/sandesh_ statistics. cc cpp/test/ sandesh_ message_ test.cc python/ pysandesh/ sandesh_ stats.py
library/
library/
library/
library/
library/
Change-Id: I2817ed643f1cd0 2ca916332c0d4f0 9e3f7b5f2c5