Skip to content

Commit 9b5fc66

Browse files
authored
docs: add examples to readme for concurrency option (#274)
1 parent 523e4cf commit 9b5fc66

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@ RedisClient.cluster(nodes: 'rediss://endpoint.example.com:6379').new_client
9090
RedisClient.cluster(nodes: 'rediss://endpoint.example.com:6379', fixed_hostname: 'endpoint.example.com').new_client
9191
```
9292

93+
```ruby
94+
# To specify concurrency settings
95+
RedisClient.cluster(concurrency: { model: :on_demand, size: 6 }).new_client
96+
RedisClient.cluster(concurrency: { model: :pooled, size: 3 }).new_client
97+
RedisClient.cluster(concurrency: { model: :none }).new_client
98+
99+
# The above settings are used by sending commands to multiple nodes like pipelining.
100+
# Please choose the one suited your workloads.
101+
```
102+
93103
## Interfaces
94104
The following methods are able to be used like `redis-client`.
95105
* `#call`

0 commit comments

Comments
 (0)