workbunny / webman-nacos Goto Github PK
View Code? Open in Web Editor NEW🚀🐇 Webman plugin workbunny/webman-nacos
Home Page: https://www.workerman.net/plugin/50
License: MIT License
🚀🐇 Webman plugin workbunny/webman-nacos
Home Page: https://www.workerman.net/plugin/50
License: MIT License
在 instance registerAsync 和 beat 需要把 ephemeral 转换成字符串,否会会造成参数失效的问题
问题:心跳接口按道理需要单独设置请求 timeout 时长,否则会造成以下场景问题
场景:如果一个心跳接口发出去了,由于网络等原因,导致超时响应了(不是超时失败,是超长时间后响应成功了),此时会导致nacos服务实例进行了一次掉线到上线的过程(会导致 weight 变为 0,见 #8 )
临时解决:通过 #8 可以解决掉线到上线后导致 weight 为 0 的问题
最佳解决:心跳接口应该设置超时时间为心跳间隔
另外:目前我看了所有 httpclient 配置的 timeout 都是取的 long_pulling_interval
的时长,感觉有些不合理,应该仅针对那个接口设置 timeout,其他的接口最好使用默认的 php 超时时间,并提供一个全局的超时时间设置的地方
现状
由于MSE Nacos的鉴权功能使用的是阿里云RAM,不支持开源的默认鉴权插件。
https://help.aliyun.com/zh/mse/user-guide/support-for-service-authentication-and-encryption-and-decryption-by-the-nacos-client?spm=a2c4g.11186623.0.0.d0852342RUV010
Fatal error: Uncaught Error: Call to undefined function Workbunny\WebmanNacos\config() in /mnt/hgfs/myenv/data/www/cnblogs/php/nacos/vendor/workbunny/webman-nacos/src/Client.php:69
Stack trace:
#0 /mnt/hgfs/myenv/data/www/cnblogs/php/nacos/config.php(6): Workbunny\WebmanNacos\Client::channel()
#1 {main}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.