YF-GoogleCodeBackups / snova

Automatically exported from code.google.com/p/snova
0 stars 0 forks source link

0.21.0版用GAE放youtube引入了新bug #386

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
具体表现为:

1、关闭range条件下:
H5视频可以播放,但一开始缓冲要等很久(进度条为零),然
后突然进度条显示了缓冲了一大堆数据;
flash视频无法播放,提示“出现错误,请稍后重试”,log里貌
似也看不出有啥问题。

2、开启range:
H5一开始也要缓冲很久(>20s),然后播放一小段就停了,从��
�度条看貌似停止缓冲了;例如该视频 
https://www.youtube.com/watch?v=X3F3KmZDtyg&hd=1,但有时候会出现这种��
�象:等了很久不开始播放,重新刷新网页,一下子又正常了�
��进度条显示缓冲正在高速下载,播放也正常。
flash视频同样症状,要么迟迟不开始播放(有时等上很久也是
黑屏),要么播放一小段就停,也有的时候是正常开始放的��
�但一般都是刷新好几次网页才有……)
以上测试环境是windows+chrome 25, 
GAE设置了5个node并发。googleIP是自定义的(都可连上443,ping40~
100)

总体感觉GAE放youtube有些问题,没有以前的版本那种即点即放�
��高速缓冲的感觉,虽然之前版本的断流问题感觉并没有完全
解决,例如issue 
211所列举的。相比较之下APJP和goagent放youtube问题少,更让人��
�心。snova现已成为我的开机启动项,于我而言其优势在于灵��
�的spac规则下对各个代理的调用,单论gae实现,效率上感觉不
如goagent和apjp那么令人放心,单论https,速度上跟JAP有一定差�
��(比如同样部署在dotcloud的websocket,jap下twitter秒开,gsnova 
C4下要等个几秒甚至十几秒)。

很感谢作者的付出,期待作者能把snova的GAE进一步完善。至于
C4的range,个人感觉不是很必要,jap的websocket部署在openshift和d
otcloud甚至能达到过1mbps的速度,C4最快的时候我测下来大概是
五六百K吧,当然大部分时段是不快的。

Original issue reported on code.google.com by fifa...@gmail.com on 10 Mar 2013 at 3:52

GoogleCodeExporter commented 8 years ago
上面最后一行单位是写错了,是jap能达到1MB/s的速度,也就是
撑满我的带宽

Original comment by fifa...@gmail.com on 10 Mar 2013 at 4:16

GoogleCodeExporter commented 8 years ago
0.21.0 
将Range机制独立出来抽象成一个api了,并复用到了C4上(还有�
��虑复用到Forward上),可能还有一些隐藏的问题待查。

snova/gsnova的proxy是HTTP 
Proxy,相比socks方式在代理https上多了一次HTTP 
CONNECt连接协商过程,所以在连接过程中相比jap有延迟。
相比JAP的速度问题可能和额外的HTTP解析以及TCP连接复用有关�
��snova限制全局到C4服务端只有MaxConn个长连接, 
JAP则是每个Proxy创建一个连接)。

Original comment by yinqiwen@gmail.com on 10 Mar 2013 at 5:46

GoogleCodeExporter commented 8 years ago
我把服务端从go换回了java的,貌似也无任何改善。
还有新版本出现了大量这种log,是什么原因?
2013/03/10 14:50:27 c4_http.go:141: Pull worker:4 stop working
2013/03/10 14:50:27 c4_http.go:128: Pull worker:4 start working
2013/03/10 14:50:29 c4_http.go:141: Pull worker:1 stop working
2013/03/10 14:50:29 c4_http.go:128: Pull worker:1 start working
2013/03/10 14:50:29 c4_http.go:141: Pull worker:12 stop working
2013/03/10 14:50:29 c4_http.go:128: Pull worker:12 start working
2013/03/10 14:50:34 c4_http.go:141: Pull worker:13 stop working
2013/03/10 14:50:34 c4_http.go:128: Pull worker:13 start working
2013/03/10 14:50:37 c4_http.go:141: Pull worker:4 stop working
2013/03/10 14:50:37 c4_http.go:128: Pull worker:4 start working
2013/03/10 14:50:39 c4_http.go:141: Pull worker:12 stop working
2013/03/10 14:50:39 c4_http.go:128: Pull worker:12 start working
2013/03/10 14:50:44 c4_http.go:141: Pull worker:10 stop working
2013/03/10 14:50:44 c4_http.go:128: Pull worker:10 start working
2013/03/10 14:50:44 c4_http.go:141: Pull worker:13 stop working
2013/03/10 14:50:44 c4_http.go:128: Pull worker:13 start working
2013/03/10 14:50:48 c4_http.go:141: Pull worker:4 stop working
2013/03/10 14:50:48 c4_http.go:128: Pull worker:4 start working
2013/03/10 14:50:49 c4_http.go:141: Pull worker:12 stop working
2013/03/10 14:50:49 c4_http.go:128: Pull worker:12 start working
2013/03/10 14:50:54 c4_http.go:141: Pull worker:10 stop working
2013/03/10 14:50:54 c4_http.go:128: Pull worker:10 start working
2013/03/10 14:50:55 c4_http.go:141: Pull worker:13 stop working
2013/03/10 14:50:55 c4_http.go:128: Pull worker:13 start working
2013/03/10 14:50:58 c4_http.go:141: Pull worker:4 stop working
2013/03/10 14:50:58 c4_http.go:128: Pull worker:4 start working
2013/03/10 14:51:00 c4_http.go:141: Pull worker:12 stop working
2013/03/10 14:51:00 c4_http.go:128: Pull worker:12 start working
2013/03/10 14:51:04 c4_http.go:141: Pull worker:10 stop working
2013/03/10 14:51:04 c4_http.go:128: Pull worker:10 start working
2013/03/10 14:51:05 c4_http.go:141: Pull worker:13 stop working
2013/03/10 14:51:05 c4_http.go:128: Pull worker:13 start working

Original comment by fifa...@gmail.com on 10 Mar 2013 at 6:53

GoogleCodeExporter commented 8 years ago
你把MaxConn改的太大了。这个是保持到C4的长连接,每个连接��
�多保持ReadTimeout秒(这个又设置的太短)。
注意这个在不支持HTTP chunked 
response的PaaS上要将ReadTimeout改为3才正常工作(如Appfog)

Original comment by yinqiwen@gmail.com on 10 Mar 2013 at 6:56

GoogleCodeExporter commented 8 years ago
readtomeout 我用的新版默认的 200, 
貌似上一版默认是25,这个单位是s还是ms……
maxconn我用了15……,设置了3个node,
maxconn这一版默认是1,也太小了吧?

Original comment by fifa...@gmail.com on 10 Mar 2013 at 7:11

GoogleCodeExporter commented 8 years ago
单位秒。
没做过测试。在网络比较好的情况下,设置为1工作地很正常�
��没有太明显的延迟情况。(不过设置为1会大大降低PaaS服务�
��负载)

Original comment by yinqiwen@gmail.com on 10 Mar 2013 at 7:15

GoogleCodeExporter commented 8 years ago
我开了3个C4 
node,如设置maxconn为1的话,只有一个工作,其他两个一直歇��
�?
另外一直不是很了解C4设置多个node有无帮助?

Original comment by fifa...@gmail.com on 10 Mar 2013 at 7:21

GoogleCodeExporter commented 8 years ago
都会工作的,顺序选择的方式。
第一个Proxy连接的请求选择第一个C4 
Node,第二个选择第二个node,以此类推

Original comment by yinqiwen@gmail.com on 10 Mar 2013 at 7:23

GoogleCodeExporter commented 8 years ago
顺便问下:下面这个log怎么会出现的,我设置了自定义的googl
eIP,里面并没有74.125
.128.86这个ip,我看cloud 
host里面也没这个ip,但是启动gsnova时为何要去连这个ip呢?

2013/03/10 15:22:06 gae.go:582: Init GAE.
2013/03/10 15:22:08 gae.go:260: Failed to request data from GAE:xxxx.apps
pot.com for:http: error connecting to proxy https://GoogleHttps: dial tcp 74.125
.128.86:443: i/o timeout
2013/03/10 15:22:08 gae.go:190: http: error connecting to proxy https://GoogleHt
tps: dial tcp 74.125.128.86:443: i/o timeout
2013/03/10 15:22:08 gae.go:627: Failed first to auth appid:http: error connectin
g to proxy https://GoogleHttps: dial tcp 74.125.128.86:443: i/o timeout

Original comment by fifa...@gmail.com on 10 Mar 2013 at 7:28

GoogleCodeExporter commented 8 years ago
顺便问下,我设置了自定义googleip,里面并没有某个google ip 
比如:74.125.128.86
我看cloud host里也没这个ip,
但是日志里有时却会出现类似dial tcp 74.125.128.86:443 time out 
云云,这是怎么回事
btw: 怎么今天连发几条log都被系统吃了……

Original comment by fifa...@gmail.com on 10 Mar 2013 at 7:41

GoogleCodeExporter commented 8 years ago
如果[GAE]下的Proxy=有设置,默认连接的是这个地址;同时这个
地址又可以在cloud_hosts.conf和user_hosts.conf中配置(user_hosts优先
)

Original comment by yinqiwen@gmail.com on 10 Mar 2013 at 7:46

GoogleCodeExporter commented 8 years ago
[GAE]下有Proxy=https://GoogleHttps,就是说只要有这个在就是连接74
.125.128.86这个固定的ip?

可能我没有表达清楚我的意思,我已经在user_hosts.conf中设置��
�自定义的googlehttps ip,但一上来连GAE没有根据我的这些ip来

我希望的结果是凡是要连google的443端口,统一从我的user_hosts.
conf里面的列表里面尝试,不管是一上来连GAE还是通过根据spac
匹配访问google服务的,该如何设置?谢谢~

Original comment by fifa...@gmail.com on 10 Mar 2013 at 7:57

GoogleCodeExporter commented 8 years ago
你的user_hosts.conf怎么配置的?

Original comment by yinqiwen@gmail.com on 10 Mar 2013 at 8:02

GoogleCodeExporter commented 8 years ago
gsnova.conf
[Google]
Enable=1
ConnectTimeout=1500
PreferIP=true
Proxy=

user_host.conf
#myappid.appspot.com=1.1.1.1
GoogleHttpsIP=*.*.*.*|*.*.*.*|*.*.*.*|*.*.*.*|*.*.*.*

Original comment by fifa...@gmail.com on 10 Mar 2013 at 8:08

GoogleCodeExporter commented 8 years ago
相应的[GAE]下Proxy改为Proxy=https://GoogleHttpsIP
[Google]下PreferIP=true

Original comment by yinqiwen@gmail.com on 10 Mar 2013 at 8:18

GoogleCodeExporter commented 8 years ago
OK,
thanks

Original comment by fifa...@gmail.com on 10 Mar 2013 at 8:34

GoogleCodeExporter commented 8 years ago
经过测试,这个issue也fix了

Original comment by fifa...@gmail.com on 10 Mar 2013 at 4:25