mattermost-plugin-analytics icon indicating copy to clipboard operation
mattermost-plugin-analytics copied to clipboard

Compatible HA

Open manland opened this issue 6 years ago • 3 comments

Today plugin retain local stats in memory (and store it every minute in KVStore). Find a way to make it HA compatible.

manland avatar Feb 24 '19 22:02 manland

First idea: Just write everything to KVStore. But since methods get posted every second, this can cause problems.

hanzei avatar Feb 27 '19 10:02 hanzei

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.

manland avatar Feb 27 '19 17:02 manland

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.

hanzei avatar Feb 27 '19 17:02 hanzei