Comments (6)
每个推送到 udp
的包都带着推送时间 lastRefTime
,永远应用最新的结果。但目前不推荐使用 udp
方式了,建议升级版本到 2.x
(服务端和客户端)
from nacos.
udp push is an enhancement way to push data to client 1.X.
Actual 1.X client use polling way to get data as core way, and the data with the lastTime to keep the data is newest data.
from nacos.
udp push is an enhancement way to push data to client 1.X.
Actual 1.X client use polling way to get data as core way, and the data with the lastTime to keep the data is newest data.
你没理解我的意思,nacos server udp是可能存在乱序的,client端并没有处理乱序问题。如果乱序,意味着client本地缓存是错误的数据,所以udp推送不算优化吧,因为你无法直到udp是否乱序。udp推送可有可无。 当然定时拉取可以保证服务状态最新
from nacos.
udp push is an enhancement way to push data to client 1.X.
Actual 1.X client use polling way to get data as core way, and the data with the lastTime to keep the data is newest data.你没理解我的意思,nacos server udp是可能存在乱序的,client端并没有处理乱序问题。如果乱序,意味着client本地缓存是错误的数据,所以udp推送不算优化吧,因为你无法直到udp是否乱序。udp推送可有可无。 当然定时拉取可以保证服务状态最新
客户端处理了的
if (oldService.getLastRefTime() > serviceInfo.getLastRefTime()) {
NAMING_LOGGER.warn("out of date data received, old-t: " + oldService.getLastRefTime() + ", new-t: "
+ serviceInfo.getLastRefTime());
}
from nacos.
udp push is an enhancement way to push data to client 1.X.
Actual 1.X client use polling way to get data as core way, and the data with the lastTime to keep the data is newest data.你没理解我的意思,nacos server udp是可能存在乱序的,client端并没有处理乱序问题。如果乱序,意味着client本地缓存是错误的数据,所以udp推送不算优化吧,因为你无法直到udp是否乱序。udp推送可有可无。 当然定时拉取可以保证服务状态最新
客户端处理了的
if (oldService.getLastRefTime() > serviceInfo.getLastRefTime()) { NAMING_LOGGER.warn("out of date data received, old-t: " + oldService.getLastRefTime() + ", new-t: " + serviceInfo.getLastRefTime()); }
额,上面也只是打印呀。
再说udp乱序是由于IP层分包导致,即使你上面处理了也没用。 源码里是用一个byte数组接收,所以byte数组里面的内容可能会乱。
当然,这是历史问题,现在是长连接推送没毛病。
from nacos.
所以udp推送只能算是优化, 在没有乱序没有网络故障和网络防火墙的时候,能比轮询查询更快的感知到列表变化, 但是当有乱序、故障、或udp防火墙的时候,udp不可达或达的数据有问题,会通过核心的轮询查询或者最新的正确数据。
from nacos.
Related Issues (20)
- 服务端频繁出现 get data during dump HOT 2
- [test] module log upgrade to junit5
- springboot服务偶发与nacos server断连导致下线后重新注册 HOT 1
- [test] module naming upgrade to junit5
- 集群模式下,某一个节点重启第一次distro数据全量同步失败 HOT 3
- nacos2.3.1通过openapi发送心跳实例不能维持实例的健康状态 HOT 5
- Nacos Unauthorized Vulnerability HOT 1
- 系统语言切换至英文后,权限控制-角色管理页面的查询条件的label还显示的是中文
- Version:2.3.2 Unauthorized access to information leakage HOT 1
- linux环境中启动nacos异常
- 求助!单机模式启动报错,试了多个版本都报错
- [db-error] master db down
- nacos upgrade: Client not connected,current status:STARTING HOT 1
- 客户端使用2.2.3 nacos-client,服务端2.3.1,开启安全认证,微服务注册临时实例成功后修改密码,微服务配置不做修改和重启,服务持续在线 HOT 1
- Docker-compose deployment nacos fail
- 服务列表和配置管理列表页面下面能不能加上总记录数
- How to set a key in docker? HOT 1
- 克隆和导入配置没有记录操作人
- 请问监听有考虑过回调接口是一个数组吗
- 将实例下线后consumer侧没有实时生效,几秒内还能调用到该实例
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.