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

Tokio support and multiplexing #23

Closed
wants to merge 2 commits into from

Conversation

0xAlcibiades
Copy link

@0xAlcibiades 0xAlcibiades commented Dec 5, 2022

This PR updates the RedisSessionStore struct and its associated methods to use a redis::aio::ConnectionManager instead of a redis::Client. Using a multiplexed redis connection avoids a TCP connection/handshake from occurring on every session operation, yielding a minimum 25ms or so speedup even with a datacenter local redis instance.

Additionally, the PR adds a new method from_uri that allows creating a RedisSessionStore from a Redis URI instead of a redis::Client via from_client or from a ConnectionManager via new.

This also migrates the repo to the same runtime as the rest of the axum ecosystem. Resolving #21.

@0xAlcibiades
Copy link
Author

Also resolves #20

@0xAlcibiades
Copy link
Author

What is the use case for #15 with multiplexing/retry and error?

@0xAlcibiades
Copy link
Author

@jbr do we want to add flags here for async-std/tokio?

@jbr
Copy link
Owner

jbr commented Dec 6, 2022

@jbr do we want to add flags here for async-std/tokio?

yes, this crate should continue to support async-std as well as tokio

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