Comments (4)
- 没有问题,既然注册是持久化的服务, 那么在你主动注销之前,肯定是存在在, 至于IP被复用的问题,与nacos无关。
- 为何不使用非持久化服务?非持久化服务会在链接断开或超时之后自动移除掉,本身设计出来就是为了类似k8s这样的场景的。
from nacos.
是的,使用临时实例是一个比较好的选择。但是在k8s环境下,我们如果使用nacos,其实是替代了k8s原生service的服务发现能力,同时service会在pod readiness检查不通过时将ip从endpoint剔除,因此当使用nacos时,我们想利用nacos的http健康检查,检查pod的readiness,当检查不通过时,将实例健康状态之于false,从而匹配了service的能力。显然,只有注册持久化实例才能做到nacos服务端的http健康检查。
from nacos.
之前我们一直认为使用持久化实例,并配置相关的健康检查是非常不错的选择。
但是最近我们在使用k8s+consul的过程中发现了,ip复用的情况导致服务实例状态显示不正确,而consul的http健康检查也是与nacos持久化实例http健康检查类似,所以有了此issue提问。
导致我们之前使用k8s+nacos持久化实例+preStop的方案有些动摇,而且我们注意到持久化实例如果降为0则一定会触发阈值保护,与我们想的类似service从endpoint中剔除ip有一定差别。
所以,我们现在十分困惑,在k8s中最佳实践是使用临时还是持久化实例?您给出的“临时实例本身设计出来就是为了类似k8s这样的场景的”,是指最佳实践是k8s中使用临时实例吗?
非常期待您能给出建议。
from nacos.
临时实例设计就是为了应对如今大多数微服务场景, 例如容器化后的ip频繁变更,扩缩容等问题,不需要额外再让用户通过手段来保证实例个数的准确性和一致性(实际上是通过机制在内部解决了),因此本身临时实例就是大多数场景下的最佳实践。
但是有部分场景其实还是需要持久化服务的,例如类DNS的场景,传统部署服务在上云和微服务化改造过程中,以及不方便引入nacos-client的场景。
from nacos.
Related Issues (20)
- 客户端断电,管理台一直能查到实例 HOT 5
- 用户名密码错误 HOT 7
- Nacos 2.3.2 开启鉴权后控制台无论使用什么密码登录都显示账户密码错误 HOT 13
- springboot服务不定时下线,与nacos断开连接,在下线时close_wait连接突然增多,平时没有
- Nacos nacos cve-2024-22259漏洞,修复方案 HOT 1
- nacos加载yml配置文件中的信息时机太早,出现某些包还没有处理完yml配置,nacos无法获取正确的配置 HOT 3
- Log4j2 升级到 2.23.1版本后,Nacos 会导致 Log4j2 日志输出异常
- ClientWorker 超时时间没有读取配置,而是写死 3000 毫秒
- [test] module auth upgrade to junit5
- [test] module sys upgrade to junit5
- nacos集群某个节点每间隔1天左右宕机,问题持续近3天了,麻烦大佬们给个排查思路,感谢!!! HOT 2
- 请问2.3.0把quickstart功能去掉了吗
- nacos服务存在jar包冲突,在ide中启动服务连接不到nacos,nacos后台报错NoSuchMethodError
- nacos2.3.2 开启https(已配置好证书,服务能够正常注册),使用Junit5测试接口报错
- 请忽略
- [test] module common upgrade to junit5
- [test] module config upgrade to junit5
- [test] module consistency upgrade to junit5
- {'code': 20004, 'message': 'resource not found', 'data': 'no matched ip found!'} HOT 1
- Adding Oracle & DAMENG Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nacos.