Using a LUA script to write the subscriptions#30
Closed
smasry wants to merge 1 commit intoanycable:masterfrom
Closed
Using a LUA script to write the subscriptions#30smasry wants to merge 1 commit intoanycable:masterfrom
smasry wants to merge 1 commit intoanycable:masterfrom
Conversation
Member
|
Hey, thanks for the pull request! Why you decided to use Lua? Is there any performance bottleneck you hit into, and how much Lua improved the situation? |
Contributor
Author
|
@Envek There are performance improvements using LUA. In testing we see a ~50% reduction from an average of 4ms to a 2ms when calling write_subscription with using a LUA script. |
Member
|
Oh, wow, drop from 4 to 2 ms is a lot. It is surprising, tbh. Interesting, what Redis server are you using and how “far” it is from your application? High RTT can be a cause for this distinction. Also, do you use broadcasting and how many subscriptions per fingerprint you have? I tried to optimize this use case in #28, but didn't finish yet (maybe it is related, not sure). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using a LUA script to write the subscriptions to redis.