redis-clustering 5.0.3 → 5.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -2
- data/lib/redis/cluster/client.rb +0 -2
- data/lib/redis/cluster.rb +1 -0
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8906712b9949503d2e1b4a7a399e874d7fbf9b4a83a24fdc07d51899b8ca96a
|
4
|
+
data.tar.gz: a43929498b90257387c6666e64f52db5211edfabf95fbaa6445240c8655a3f19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd5acf4b415e67c3cbe904ed44e814175d8c5b69f75d61b5fd8f66b0c6155e4b5bc9908fc3de0dbe16b50db4fd43de014bc34c83e3477b39be5118513eddb9fa
|
7
|
+
data.tar.gz: 884aec02c9bdbb2e9d7a833c942a5dd07da8cd442e4785831e02b71f90283880cb3323618f9b29092dd183e2b97e9e2ef478f7b8313545cb3fd569bab383f967
|
data/README.md
CHANGED
@@ -39,6 +39,12 @@ If you want [the connection to be able to read from any replica](https://redis.i
|
|
39
39
|
Redis::Cluster.new(nodes: nodes, replica: true)
|
40
40
|
```
|
41
41
|
|
42
|
+
Also, you can specify the `:replica_affinity` option if you want to prevent accessing cross availability zones.
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
Redis::Cluster.new(nodes: nodes, replica: true, replica_affinity: :latency)
|
46
|
+
```
|
47
|
+
|
42
48
|
The calling code is responsible for [avoiding cross slot commands](https://redis.io/topics/cluster-spec#keys-distribution-model).
|
43
49
|
|
44
50
|
```ruby
|
@@ -59,13 +65,13 @@ redis.mget('{key}1', '{key}2')
|
|
59
65
|
Since Redis can return FQDN of nodes in reply to client since `7.*` with CLUSTER commands, we can use cluster feature with SSL/TLS connection like this:
|
60
66
|
|
61
67
|
```ruby
|
62
|
-
Redis.new(
|
68
|
+
Redis::Cluster.new(nodes: %w[rediss://foo.example.com:6379])
|
63
69
|
```
|
64
70
|
|
65
71
|
On the other hand, in Redis versions prior to `6.*`, you can specify options like the following if cluster mode is enabled and client has to connect to nodes via single endpoint with SSL/TLS.
|
66
72
|
|
67
73
|
```ruby
|
68
|
-
Redis.new(
|
74
|
+
Redis::Cluster.new(nodes: %w[rediss://foo-endpoint.example.com:6379], fixed_hostname: 'foo-endpoint.example.com')
|
69
75
|
```
|
70
76
|
|
71
77
|
In case of the above architecture, if you don't pass the `fixed_hostname` option to the client and servers return IP addresses of nodes, the client may fail to verify certificates.
|
data/lib/redis/cluster/client.rb
CHANGED
data/lib/redis/cluster.rb
CHANGED
@@ -53,6 +53,7 @@ class Redis
|
|
53
53
|
# @option options [Boolean] :inherit_socket (false) Whether to use socket in forked process or not
|
54
54
|
# @option options [Array<String, Hash{Symbol => String, Integer}>] :nodes List of cluster nodes to contact
|
55
55
|
# @option options [Boolean] :replica Whether to use readonly replica nodes in Redis Cluster or not
|
56
|
+
# @option options [Symbol] :replica_affinity scale reading strategy, currently supported: `:random`, `:latency`
|
56
57
|
# @option options [String] :fixed_hostname Specify a FQDN if cluster mode enabled and
|
57
58
|
# client has to connect nodes via single endpoint with SSL/TLS
|
58
59
|
# @option options [Class] :connector Class of custom connector
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-clustering
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ezra Zygmuntowicz
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2022-09-
|
19
|
+
date: 2022-09-22 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: redis
|
@@ -24,28 +24,28 @@ dependencies:
|
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 5.0.
|
27
|
+
version: 5.0.5
|
28
28
|
type: :runtime
|
29
29
|
prerelease: false
|
30
30
|
version_requirements: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - '='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 5.0.
|
34
|
+
version: 5.0.5
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: redis-cluster-client
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
41
|
+
version: 0.3.7
|
42
42
|
type: :runtime
|
43
43
|
prerelease: false
|
44
44
|
version_requirements: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - "
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
48
|
+
version: 0.3.7
|
49
49
|
description: |2
|
50
50
|
A Ruby client that tries to match Redis' Cluster API one-to-one, while still
|
51
51
|
providing an idiomatic interface.
|
@@ -68,9 +68,9 @@ licenses:
|
|
68
68
|
metadata:
|
69
69
|
bug_tracker_uri: https://github.com/redis/redis-rb/issues
|
70
70
|
changelog_uri: https://github.com/redis/redis-rb/blob/master/cluster/CHANGELOG.md
|
71
|
-
documentation_uri: https://www.rubydoc.info/gems/redis/5.0.
|
71
|
+
documentation_uri: https://www.rubydoc.info/gems/redis/5.0.5
|
72
72
|
homepage_uri: https://github.com/redis/redis-rb/blob/master/cluster
|
73
|
-
source_code_uri: https://github.com/redis/redis-rb/tree/v5.0.
|
73
|
+
source_code_uri: https://github.com/redis/redis-rb/tree/v5.0.5/cluster
|
74
74
|
post_install_message:
|
75
75
|
rdoc_options: []
|
76
76
|
require_paths:
|