Skip to content

Ensuring Scalability: Redis Connection Management in Production #434

Discussion options

You must be logged in to vote

Hey, good to hear you are checking out apalis and I appreciate your questions they are pretty important.

  1. Does apalis support connection pooling in redis? The answer is yes with an asterisk. Basically RedisStorage only cares if you have implemented aio::ConnectionLike. We already have an example that uses deadpool for pooling:

    let cfg = Config::from_url("redis://127.0.0.1/");
    let pool = cfg.create_pool(Some(Runtime::Tokio1)).unwrap();
    let conn = pool.get().await.unwrap();
    let mut storage = RedisStorage::new_with_config(conn, config);
    // This can be in another part of the program
    prod…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by anwar-al-jahwari
Comment options

You must be logged in to vote
3 replies
@geofmureithi
Comment options

@geofmureithi
Comment options

@anwar-al-jahwari
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #433 on October 15, 2024 12:09.