support signal SIGHUB reload modules config #892
Replies: 5 comments
-
说一下我的理解,如果存在理解上的错误,请指正。目前这个想法是想通过 SIGHUB来重新加载 bfe/conf/.../ ....data 这样的配置文件吗,目前的重载实现的方式是通过conf-agent里面for循环sleep 一定的时间来发送http 请求来对比是否配置文件已经被更新了,如果更新了还是通过http 请求发送给bfe 来重新加载对应配置。目前在bfe 上面还没有对配置文件的监控,如果使用sighub 的话,当有一个配置修改了,无法定位到是那个配置修改,需要对比全部的配置文件来定位,或者直接对所有对应的配置文件都重新加载一遍?所以我想这里是不是可以采取这样的方式,https://github.com/spf13/viper 通过viper 来在每个配置文件初次加载的时候,使用viper 来监控对应的配置文件,当配置文件有所改动的时候,可以直接监控到变化,直接就更新了对应的配置文件。如果viper 的配置动态更新机制适合这边的场景,我这边可以在bfe的基础上来尝试实现一版。 |
Beta Was this translation helpful? Give feedback.
-
Thx for response :-) This idea comes from Support |
Beta Was this translation helpful? Give feedback.
-
Some Results of discussion: 1 : bfe more suitable for using http trigger reload update configurations , in conf-agent provided temporary conf File which prepare check the conf file will more security。 2 : conf -agent pull conf from api-server , which is easy to implement than api-server push to conf-agent. 3: Configuration center will make the bfe more complex to build,the current approach is simpler. |
Beta Was this translation helpful? Give feedback.
-
Config center solution like When From |
Beta Was this translation helpful? Give feedback.
-
Sent from PPHub
Beta Was this translation helpful? Give feedback.
All reactions