Closed smasry closed 1 year ago
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?
@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.
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 https://github.com/anycable/graphql-anycable/pull/28, but didn't finish yet (maybe it is related, not sure).
Using a LUA script to write the subscriptions to redis.