Skip to content

Conversation

@smasry
Copy link
Contributor

@smasry smasry commented Jan 13, 2023

Using a LUA script to write the subscriptions to redis.

@Envek
Copy link
Member

Envek commented Jan 17, 2023

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?

@smasry
Copy link
Contributor Author

smasry commented Jan 20, 2023

@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.

@Envek
Copy link
Member

Envek commented Jan 20, 2023

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).

@smasry smasry closed this Mar 29, 2023
@smasry smasry deleted the lua_write_subscription branch March 29, 2023 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants