Comments (12)
刚kill的时候当时还在进行的请求是肯定会断的,但是过了一段时间,最长不超过proxy配置的session超时时间,再请求就不会报错了
2015年12月15日星期二,Ady Xiong [email protected] 写道:
我启用了2个proxy(分别是proxy1、proxy2),用jodis并发测试。在测试过程中,我手动kill掉proxy2,这个时候jodis客户端报:
redisclientsjedisexceptionsJedisConnectionException: Unexpected end of
stream
感觉jodis实现负载均衡没有起到作用,还是我使用不正确?—
Reply to this email directly or view it on GitHub
#9.
Thanks,
Phil Yang
from jodis.
你说的”session超时时间“,是不是session_max_timeout?如果这个值很大,那等待时间是不是也很久?
我设置session_max_timeout=172800,所以一直没有切换过来
from jodis.
不是,是zk_session_timeout。详情见配置文件中的注释。
https://github.com/wandoulabs/codis/blob/master/config.ini#L37
from jodis.
Jodis是监控zk上结点变化来增加proxy的
首先手动kill如果是kill -9的话需要一段时间zk上的结点才会消失(取决于proxy设置的zk session超时时间)。
其次zk上的节点消失到jodis这边收到通知也有一定的时间,但最长不会超过jodis这边设置的zk session超时时间
这中间需要一个trade off,如果超时时间特别短那jodis切换就会很快,但代价就是proxy很容易因为网络抖动或者高负载而死掉。如果超时时间很长那代价就是jodis切换会很慢。
谢谢
from jodis.
经过测试发现,Jodis无法负载均衡,@Apache9说的很对
from jodis.
“无法负载均衡”是什么意思?
from jodis.
对,你说的无法负载均衡是啥意思?我的意思是jodis最终还是能把坏的节点踢掉的,只是时间长短的问题
from jodis.
可能我说的有点过哦,呵呵,就是像@Apache9说的:”如果超时时间很长那代价就是jodis切换会很慢“,我本地测试结果也是切换时间比较长。
from jodis.
你的zk_session_timeout设的是多少?
from jodis.
那你就把超时时间设短一点儿。。。这个看你业务本身的需求到底是要反应多快
from jodis.
还有个问题就是,无论你怎么设参数,业务上如果要求不能访问失败,肯定是要加重试的逻辑的,基于zk的HA永远是比实际的情况慢半拍的
from jodis.
赞同
from jodis.
Related Issues (20)
- 一个隐藏的异常处理风险 HOT 1
- jodis原子性问题 HOT 9
- redis.clients.jedis.exceptions.JedisException: Proxy list empty
- jodis整合spring session的问题 HOT 10
- codis jodis Extranet client Connection refused HOT 1
- 希望jodis引用guava版本升级到最新21.0 HOT 5
- 可以支持连接多个zookeeper吗? HOT 6
- 0.5.0版本是否不支持jdk1.7 HOT 1
- 0.3.0的jodis对应的后端是codis3集群,zk挂掉jodis是否能正常访问 HOT 1
- 是否支持IPV6 HOT 2
- Thread-safety problem in RoundRobinJedisPool HOT 9
- jedis连接池不断重连导致proxy session数不断增长 HOT 3
- No content to map due to end-of-input HOT 3
- jodis如何保证proxy下线时获取的client可用?(ZK通知有延迟、感知proxy下线需要时间) HOT 4
- Jodis连接codis报错:Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.UnknownHostException: iZwz977ogd6jecq7rowvtsZ
- No content to map due to end-of-input HOT 2
- 启动codis客户端初始化 异常 HOT 2
- 使用jodis压测比使用benchmark进行压测是qps低很多的问题
- 线上环境,偶尔Could not get a resource from the pool HOT 8
- jodis连接zookeeper报错 HOT 1
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 jodis.