Giter Club home page Giter Club logo

Comments (1)

luoxiaojun1992 avatar luoxiaojun1992 commented on June 13, 2024

yii2好像不支持动态修改配置。
假设需要实现的话,只能通过文件替换。

有如下问题

  1. json不能完全替代php array,只能做部分替换,要对文件内容做复杂的对比,可能会影响性能
  2. yii2没有提供动态修改配置的方法,直接替换文件可能会有权限、安全性等问题
  3. 拉取tars-config配置需要服务启动的配置,只能在server启动后通过App::getTarsConfig()获取,server启动前后的配置会有不一致,而且多个进程同时拉取配置,替换文件也会影响性能或者产生其他问题
  4. 目前tars-config配置只能在启动时拉取,并不能动态更新,完全用tars-config的配置没有意义,完全可以通过运维部署阶段替换配置文件,实现配置的下发
  5. 需求不通用

如果确有需求,建议自己定制,谢谢

from yii2-tars.

Related Issues (4)

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.