orlabs / orange

OpenResty/Nginx Gateway for API Monitoring and Management.

Home Page:http://orange.sumory.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

我想咨询下orange的集群模式。

zhouwenfanwk opened this issue · comments

需求或场景

我想要使用orange的高可用。也不知道集群模式如何具体部署。orange宕机的话会影响到openresty吗?

1、在orange.conf的 plugins中加入node,表示开启node插件;并修改api的用户和密码

    "plugins": [
        "stat",
        "headers",
        "monitor",
        "redirect",
        "rewrite",
        "rate_limiting",
        "property_rate_limiting",
        "basic_auth",
        "key_auth",
        "jwt_auth",
        "hmac_auth",
        "signature_auth",
        "waf",
        "divide",
        "kafka",
        "kvstore",
         "node" -- 加入node
    ],
...
    "api": {
        "auth_enable": false,
        "credentials": [
            {
                "username":"你的用户名",
                "password":"你的密码"
            }
        ]
    }

2、部署多个orange节点,同时在每个节点的dashboard启用node插件
3、每个节点dashboard,集群管理中先注册节点添加自己,然后添加节点依次加入其它节点,需要输入其他节点的 ip 端口 用户名 和 密码

4、然后用前置LVS或HAproxy或硬件负载,给多个orange节点做负载,这就是nginx高可用和集群的问题了

orange多节点主要是同步个节点的数据,这样的话只要在一个节点做配置,其他节点都能同步到