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

Idea: only use hiredis reader? #161

Open
casperisfine opened this issue Jan 19, 2024 · 1 comment
Open

Idea: only use hiredis reader? #161

casperisfine opened this issue Jan 19, 2024 · 1 comment

Comments

@casperisfine
Copy link
Collaborator

casperisfine commented Jan 19, 2024

Ref: #133
Ref: #135

Hiredis is quite a pain to bind, and it's lacking behind in SSL capabilities etc.

I don't think there is much in the hiredis IO layer that really justifies binding the entire library.

It would make sense to only bind the redisReader part, do the IO in Pure Ruby, and call redisReaderFeed + redisReaderGetReply.

@vstakhov
Copy link

vstakhov commented Oct 1, 2024

Surprisingly I was also hoping that the modern version of hiredis could have at least some sane support of SSL, however, it seems to be not the case. Please note, that not only connect must be aware of SSL specific, but also closing is tricky to handle in asynchronous mode (e.g. SSL_close can return WANT_READ/WANT_WRITE that should be handled properly).

If an SSL connection is not closed properly, then OpenSSL does not put it into SSL cache, meaning that connection renegotiation will be expensive due to the full handshake.

Sometimes I think that there should be some better maintained Redis C library to be honest.

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

No branches or pull requests

2 participants