All Projects → hyw97m → redis_cluster

hyw97m / redis_cluster

Licence: other
a openresty nginx lua redis cluster

Programming Languages

lua
6591 projects
perl
6916 projects
Makefile
30231 projects

Projects that are alternatives of or similar to redis cluster

Orange
OpenResty/Nginx Gateway for API Monitoring and Management.
Stars: ✭ 2,208 (+8392.31%)
Mutual labels:  openresty, resty
lua-resty-aries
openresty and lua multi-function template
Stars: ✭ 47 (+80.77%)
Mutual labels:  openresty, resty
dentist
Close assembly gaps using long-reads at high accuracy.
Stars: ✭ 39 (+50%)
Mutual labels:  cluster
NodeServer
Compare node.js servers
Stars: ✭ 35 (+34.62%)
Mutual labels:  cluster
flip
Simple, lightweight, virtual IP management utility for moving IPs around nodes in response to cluster events.
Stars: ✭ 23 (-11.54%)
Mutual labels:  cluster
httpdump
A complete openresty-based tool for dumping http request & response in json format log.
Stars: ✭ 15 (-42.31%)
Mutual labels:  openresty
inspr
Inspr is an agnostic application mesh for simpler, faster, and securer development of distributed applications (dApps).
Stars: ✭ 49 (+88.46%)
Mutual labels:  cluster
terraform-aws-druid
Terraform module to deploy Apache Druid in Kubernetes
Stars: ✭ 16 (-38.46%)
Mutual labels:  cluster
ansible.pcs-modules-2
Ansible modules for interacting with pacemaker clusters (2nd generation)
Stars: ✭ 26 (+0%)
Mutual labels:  cluster
lagopus
Distributed fuzzing platform
Stars: ✭ 28 (+7.69%)
Mutual labels:  cluster
restyskeleton
Spawning barebones openresty applications from the terminal using ancient witchcraft
Stars: ✭ 21 (-19.23%)
Mutual labels:  openresty
container-orchestration
A Benchmark for Container Orchestration Systems
Stars: ✭ 19 (-26.92%)
Mutual labels:  cluster
mnesiam
Mnesiam makes clustering easy for Mnesia database.
Stars: ✭ 17 (-34.62%)
Mutual labels:  cluster
lua-resty-sniproxy
SNI Proxy based on stream-lua-nginx-module
Stars: ✭ 78 (+200%)
Mutual labels:  openresty
alpine-kong
alpine-kong
Stars: ✭ 15 (-42.31%)
Mutual labels:  openresty
lua-resty-couchbase
Lua couchbase client driver for the ngx_lua based on the cosocket API / 使用cosocket纯lua实现的couchbase的client,已经在爱奇艺重要的服务播放服务稳定运行5年多
Stars: ✭ 77 (+196.15%)
Mutual labels:  resty
gce-cache-cluster
Easy groupcache clustering on GCE
Stars: ✭ 32 (+23.08%)
Mutual labels:  cluster
lua-resty-ipcidr
A simple and very fast function to check against CIDR
Stars: ✭ 17 (-34.62%)
Mutual labels:  openresty
ddrt
An elixir implementation of Rtree, optimized for fast updates.
Stars: ✭ 38 (+46.15%)
Mutual labels:  cluster
RillAdmin
vue + openresty/nodejs web admin
Stars: ✭ 34 (+30.77%)
Mutual labels:  openresty

Name

redis cluster

部署

具体不做详细说明

实例

server {
    location /t {
        content_by_lua_block {
            local rediscluster = require "resty.redis_cluster"
            local config = {
                name = "name",
                servers = {
                    { "127.0.0.1", 7001 },
                    { "127.0.0.1", 7002 },
                    { "127.0.0.1", 7003 },
                    { "127.0.0.1", 7004 },
                    { "127.0.0.1", 7005 },
                    { "127.0.0.1", 7006 },
                },
                password        = "abc",
                idle_timeout    = 1000,
                pool_size       = 200,
            }

            local redcli, err = rediscluster:new(config)
            if not ok then
                ngx.say("failed to cluster: ", err)
                return
            end

            local key = "abc"
            local ok, err = redcli:set(key, 123)
            if not ok then
                ngx.say("failed to set key: ", err)
                return
            end

            local res, err = redcli:get(key)
            if not res then
                ngx.say("failed to get key: ", err)
                return
            end
            ngx.say(res)

            local ok, err = redcli:del(key)
            if not ok then
                ngx.say("failed to del key: ", err)
                return
            end

            local res, err = redcli:get(key)
            if not res then
                ngx.say("failed to get key: ", err)
                return
            end
            ngx.say(res)
        }
    }
}

config

  • name

    集群名, 用于区别多个集群的使用

  • `servers

    服务列表, 如: {{"127.0.0.1", 7001}, {"127.0.0.1", 7002}}

  • password

    auth密码, 设置该值会连接redis时做一次auth验证

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].