redis-clustering 5.0.1 → 5.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -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: 286c2aa6f3de244c2386b01dd0c6ed9709d3c7efa3fbabd11f7bc586e4417328
|
4
|
+
data.tar.gz: bd4e7f425107ecf9b0e0987982bfbb9c8e4fb369fc084416b780c72fc27d7678
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7465fdc1a1a583aa53d25be7af06418a2eef0f3d1194728322553324a3768ba1b13b0c27188ee3e9dd6c989f0ec0649b73df96dcbcdd7d05380462ca800c2da
|
7
|
+
data.tar.gz: c3561fb101b3d31ba799f05b17adc9425cb97d031a8447ccd33b3e0a5ff67678cc5c0779fa37742d797886b3e17b71a050c439f0486849e62b510771a1e3c58a
|
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.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.4
|
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-
|
19
|
+
date: 2022-09-09 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.4
|
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.4
|
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.2
|
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.2
|
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.4
|
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.4/cluster
|
74
74
|
post_install_message:
|
75
75
|
rdoc_options: []
|
76
76
|
require_paths:
|