Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/pl 1797 aedes persistence redis scalability fix #1

Merged

Conversation

jbaramidze
Copy link

The plugin has scalability issues:

  1. Keeping track of all subscriptions in a local trie
  2. Reading all retained topic's messages on client subscriptions

Both of them were needed because MQTT generally allows subscriptions by wildcards, and the most optimal data structure for such searches is a prefix tree (aka trie). The problem was that Redis does not support such data structure, and thus things had to be kept locally, on each node.

As we removed the wildcard support, there is no more need to keep the local trie => scalability issues solved.

@jbaramidze jbaramidze requested a review from a team June 10, 2021 09:38
Copy link

@Zip753 Zip753 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks good 👍 I didn't look at the tests much, and I would refactor createRetainedStreamCombi according to the suggestions just to be extra safe that we're not doing anything illegal on streams in this critical API

persistence.js Outdated Show resolved Hide resolved
persistence.js Outdated Show resolved Hide resolved
persistence.js Outdated Show resolved Hide resolved
persistence.js Outdated Show resolved Hide resolved
@jbaramidze jbaramidze requested a review from Zip753 July 2, 2021 13:30
@jbaramidze jbaramidze merged commit cef65f5 into master Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants