Skip to content

Cache slots info & Removing "master_nodes" module variable #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 29 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ While building the client, thanks for https://github.com/cuiweixie/lua-resty-red

```lua
local config = {
dict_name = "test_locks", --shared dictionary name for locks, if default value is not used
refresh_lock_key = "refresh_lock", --shared dictionary name prefix for lock of each worker, if default value is not used
name = "testCluster", --rediscluster name
serv_list = { --redis cluster node list(host and port),
dict_name = "test_locks", --shared dictionary name for locks, if default value is not used
refresh_lock_key = "refresh_lock", --shared dictionary name prefix for lock of each worker, if default value is not used
slots_info_dict_name = "test_slots_info", --shared dictionary name for slots_info
name = "testCluster", --rediscluster name
serv_list = { --redis cluster node list(host and port),
{ ip = "127.0.0.1", port = 7001 },
{ ip = "127.0.0.1", port = 7002 },
{ ip = "127.0.0.1", port = 7003 },
Expand Down Expand Up @@ -93,10 +94,11 @@ end

```lua
local config = {
dict_name = "test_locks", --shared dictionary name for locks, if default value is not used
refresh_lock_key = "refresh_lock", --shared dictionary name prefix for lock of each worker, if default value is not used
name = "testCluster", --rediscluster name
serv_list = { --redis cluster node list(host and port),
dict_name = "test_locks", --shared dictionary name for locks, if default value is not used
refresh_lock_key = "refresh_lock", --shared dictionary name prefix for lock of each worker, if default value is not used
slots_info_dict_name = "test_slots_info", --shared dictionary name for slots_info
name = "testCluster", --rediscluster name
serv_list = { --redis cluster node list(host and port),
{ ip = "127.0.0.1", port = 7001 },
{ ip = "127.0.0.1", port = 7002 },
{ ip = "127.0.0.1", port = 7003 },
Expand Down Expand Up @@ -131,8 +133,9 @@ end
local cjson = require "cjson"

local config = {
dict_name = "test_locks", --shared dictionary name for locks, if default value is not used
refresh_lock_key = "refresh_lock", --shared dictionary name prefix for lock of each worker, if default value is not used
dict_name = "test_locks", --shared dictionary name for locks, if default value is not used
refresh_lock_key = "refresh_lock", --shared dictionary name prefix for lock of each worker, if default value is not used
slots_info_dict_name = "test_slots_info", --shared dictionary name for slots_info
name = "testCluster",
serv_list = {
{ ip = "127.0.0.1", port = 7001 },
Expand Down Expand Up @@ -181,8 +184,9 @@ end
local cjson = require "cjson"

local config = {
dict_name = "test_locks", --shared dictionary name for locks, if default value is not used
refresh_lock_key = "refresh_lock", --shared dictionary name prefix for lock of each worker, if default value is not used
dict_name = "test_locks", --shared dictionary name for locks, if default value is not used
refresh_lock_key = "refresh_lock", --shared dictionary name prefix for lock of each worker, if default value is not used
slots_info_dict_name = "test_slots_info", --shared dictionary name for slots_info
name = "testCluster",
enable_slave_read = true,
serv_list = {
Expand Down Expand Up @@ -218,8 +222,9 @@ end
local cjson = require "cjson"

local config = {
dict_name = "test_locks", --shared dictionary name for locks, if default value is not used
refresh_lock_key = "refresh_lock", --shared dictionary name prefix for lock of each worker, if default value is not used
dict_name = "test_locks", --shared dictionary name for locks, if default value is not used
refresh_lock_key = "refresh_lock", --shared dictionary name prefix for lock of each worker, if default value is not used
slots_info_dict_name = "test_slots_info", --shared dictionary name for slots_info
name = "testCluster",
enable_slave_read = true,
serv_list = {
Expand Down Expand Up @@ -261,10 +266,11 @@ end

```lua
local config = {
dict_name = "test_locks", --shared dictionary name for locks, if default value is not used
refresh_lock_key = "refresh_lock", --shared dictionary name prefix for lock of each worker, if default value is not used
name = "testCluster", --rediscluster name
serv_list = { --redis cluster node list(host and port),
dict_name = "test_locks", --shared dictionary name for locks, if default value is not used
refresh_lock_key = "refresh_lock", --shared dictionary name prefix for lock of each worker, if default value is not used
slots_info_dict_name = "test_slots_info", --shared dictionary name for slots_info
name = "testCluster", --rediscluster name
serv_list = { --redis cluster node list(host and port),
{ ip = "127.0.0.1", port = 7001 },
{ ip = "127.0.0.1", port = 7002 },
{ ip = "127.0.0.1", port = 7003 },
Expand Down Expand Up @@ -298,10 +304,11 @@ end

```lua
local config = {
dict_name = "test_locks", --shared dictionary name for locks, if default value is not used
refresh_lock_key = "refresh_lock", --shared dictionary name prefix for lock of each worker, if default value is not used
name = "testCluster", --rediscluster name
serv_list = { --redis cluster node list(host and port),
dict_name = "test_locks", --shared dictionary name for locks, if default value is not used
refresh_lock_key = "refresh_lock", --shared dictionary name prefix for lock of each worker, if default value is not used
slots_info_dict_name = "test_slots_info", --shared dictionary name for slots_info
name = "testCluster", --rediscluster name
serv_list = { --redis cluster node list(host and port),
{ ip = "127.0.0.1", port = 7001 },
{ ip = "127.0.0.1", port = 7002 },
{ ip = "127.0.0.1", port = 7003 },
Expand Down
Loading