Giter VIP home page Giter VIP logo

Comments (8)

sumory avatar sumory commented on May 26, 2024

Orange暂时只提供很简单的集群功能,并不支持自动更新集群配置,但可通过调用API或者手动同步。

集群间共享的数据只有存储在MySQL里的配置信息,在一个节点修改过配置后,可以通过以下三种方式同步其他节点:

  • 通过在其他节点上的Dashboard里触发“同步配置”
  • 通过调用其他节点上的API
  • 重启其它节点

from orange.

coder-zhuyu avatar coder-zhuyu commented on May 26, 2024

目前的限速应该是只针对单个节点的吧

from orange.

sumory avatar sumory commented on May 26, 2024

是的,也可以很简单的改到redis来支持集群。目前只有这一个插件“需要”redis,当时为了不增加复杂性,所以还没有在Orange引入redis依赖。

from orange.

coder-zhuyu avatar coder-zhuyu commented on May 26, 2024

恩,谢谢

from orange.

coder-zhuyu avatar coder-zhuyu commented on May 26, 2024

是否考虑把shared dict里面的规则放到lua table里面,减少每次解析json的操作

from orange.

sumory avatar sumory commented on May 26, 2024

@coder-zhuyu

  • 这一点有考虑,因为频繁的json序列化还是浪费了一些性能的。
  • 但会引入一个问题就是修改规则后多个worker间的数据通信(module级别的lua table是worker级别的),在一个worker里改了后要让其他worker同时修改并保证修改成功。
  • 目前能想到的更新数据的方式有
    • 每个worker起一个协程定时监控信号(可以是shared dict里的某个标识),当来信号时从存储配置的shared dict拉数据更新worker内的配置(lua table)
    • 通过外面添加一个redis,每个worker订阅redis来更新内部配置

但这两种更新数据的方式在我看来还都不够优雅,所以也就没实现这部分逻辑。

from orange.

syhily avatar syhily commented on May 26, 2024

#5 Related issue

from orange.

coder-zhuyu avatar coder-zhuyu commented on May 26, 2024

好的,谢谢

from orange.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.