go-yea's People
go-yea's Issues
热部署对Netty客户端重连的影响
服务端非正常关闭后,客户端可能会不断尝试重连服务端。如果重启服务端时又对客户端热部署,此时:1)原客户端、注册中心监听器未被销毁但同时热部署时又产生新的客户端和注册中心监听器;2)启动服务端后,通过自动重连原客户端连上了服务端;2)但同时,服务端在Zookeeper上的注册会导致客户端注册中心监听器的节点新增事件,此时新注册中心监听器通知新客户端新启线程尝试连接服务端,此时会提示服务端已连接。
Netty自动重连的问题
关闭生产者(服务端)时,如果通过kill -9 进程来关闭,可能消费者(客户端)会以为生产者尚存,会不断尝试重连。
原因:生产者destroy时,会通知所有连接该生产者的消费者该生产者准备停止,消费者收到通知后会尝试关闭连接,但如果使用kill -9后,生产者不一定能正常destroy,所以消费者会以为生产者尚存,故尝试重连。
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.