mattermost-plugin-analytics
mattermost-plugin-analytics copied to clipboard
Compatible HA
Today plugin retain local stats in memory (and store it every minute in KVStore). Find a way to make it HA compatible.
First idea: Just write everything to KVStore. But since methods get posted every second, this can cause problems.
Yes I have implemented a minimal backpressure by decoupling stock ( memory) and write into kv... Maybe its not necessary!?
I need to look at the HA implementation of mattermost, if it's master/slave I can write only in master instance and read in others.
The DB is master/slave. But an instance of the plugin is running on every instance of the MM server.
The problem is, that you race conditions can come up easily and plugin devs have no way to detect them.