Skip to content
Redis Multi-Cluster load balancing using prefix key. (use RESP)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
_example
clientsrv
config
network
respreader
.gitignore
LICENSE
README.md
glide.yaml
main.go

README.md

octopus

Go Report Card CircleCI

Redis Multi-Cluster load balancing using prefix key, No need to change anything, octopus use RESP (REdis Serialization Protocol). Developing/ Testing/ Documention in progress

Config

  • etcd
  • consul
  • json file

Sample JSON:

{
    "port": 9090,
    "pool": {
        "maxcap": 10,
        "initcap": 3
    },
    "clusters": [
        {
            "ismain": true,
            "name": "qok-match",
            "nodes": [
                "172.20.3.4:7001",
                "172.20.3.10:7004"
            ],
            "prefixes": [
                "match:",
                "stats:"
            ]
        },
        {
            "ismain": false,
            "name": "local-test",
            "nodes": [
                "localhost:6379",
                "localhost:6380"
            ],
            "prefixes": [
                "pigfog:"
            ]
        },
        {
            "ismain": false,
            "name": "qok-tournament",
            "nodes": [
                "10.5.150.5:7000",
                "10.5.150.12:7003"
            ],
            "prefixes": [
                "tournament:"
            ]
        }
    ]
}

Usage

Flags:
      --consulkey string   consul k/v namespace
      --etcdaddr string    etcd file address
  -f, --file string        config file name (without extenstion) (default "config")
  -h, --help               help for gate
      --host string        config remote host (ex. http://127.0.0.1:4001)
  -p, --path string        config path (default is /) (default "/")
  -t, --type string        config type (file, etcd, consul) (default "file")
go run main.go -f config -p ./_example -t file
You can’t perform that action at this time.