Skip to content

Trying to figure out how to scan from RedisPool #183

Answered by aembke
abcd-ca asked this question in Q&A
Discussion options

You must be logged in to vote

@abcd-ca I added a more comprehensive scanning example here:

fred.rs/examples/scan.rs

Lines 50 to 92 in 31f8f56

/// Example showing how to print the memory usage of all keys in a cluster with a `RedisPool`.
///
/// When using a clustered deployment the keyspace will be spread across multiple nodes. However, the cursor in each
/// SCAN command is used to iterate over keys within a single node. There are several ways to concurrently scan
/// all keys on all nodes:
///
/// 1. Use `scan_cluster`.
/// 2. Use `split_cluster` and `scan`.
/// 3. Use `with_cluster_node` and `scan`.
///
/// The best option depends on several factors, but…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@abcd-ca
Comment options

Answer selected by abcd-ca
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