You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 4, 2018. It is now read-only.
Given that plugins are stateless, the function of running them at certain frequencies has really become to reduce traffic to/from the database and to ensure that the respective models are updated at a known frequency. For example, statscache has plugins to count the volume of messages over given intervals (e.g., 1s, 5s) that are run at frequencies of the same intervals. So the volume per second plugin runs once per second. However, it cannot take advantage of this fact and simply record the number of messages received each time it runs, firstly because it is supposed to be stateless and secondly because some messages timestamped within the interval may arrive too late. Therefore, each plugin realistically needs to iterate over all messages received, check each timestamp, and then perform whatever processing needed. If I'm not missing anything, then plugins are not really affected or benefited by controlling their individual processing frequencies.
I would like to propose that we consider the following two options:
Real-time processing: Handle each message when it arrives, perhaps by implementing plugins as FedmsgConsumers directly. The obvious benefit to this is that stats models are always up-to-date, which is very cool, but the downside is potentially heavy traffic to the database when things get busy.
Standard update frequency: Use a single polling producer to run all plugins at an application-configurable interval (e.g., 1s). This isn't a whole lot different from what we're doing now. If the first option is too risky, this would be a good middle-ground, as database I/O will be more predictable.
Thoughts? If there are any alternative ideas or aspects that I'm missing, I'd be happy to hear about them.
Given that plugins are stateless, the function of running them at certain frequencies has really become to reduce traffic to/from the database and to ensure that the respective models are updated at a known frequency. For example, statscache has plugins to count the volume of messages over given intervals (e.g., 1s, 5s) that are run at frequencies of the same intervals. So the volume per second plugin runs once per second. However, it cannot take advantage of this fact and simply record the number of messages received each time it runs, firstly because it is supposed to be stateless and secondly because some messages timestamped within the interval may arrive too late. Therefore, each plugin realistically needs to iterate over all messages received, check each timestamp, and then perform whatever processing needed. If I'm not missing anything, then plugins are not really affected or benefited by controlling their individual processing frequencies.
I would like to propose that we consider the following two options:
FedmsgConsumers directly. The obvious benefit to this is that stats models are always up-to-date, which is very cool, but the downside is potentially heavy traffic to the database when things get busy.Thoughts? If there are any alternative ideas or aspects that I'm missing, I'd be happy to hear about them.