由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 请教一个TCP连接的问题
相关主题
小公司的网站也要用memcached之类的cache吗?redis set Time complexity: O(1) 怎么可能?
多研究些问题,比如这个网站的建设问题,大家来讨论一下backend是legecy系统,用户量会持续增加,用Java可以怎么解决?
有专门讲 message server performance 的资料吗如果做游戏后端的话,pike traffic怎么破
没有data store的model有什么用吗?为什么在我的电脑上编译好的程序,无法在其他电脑上运行?
请教古老师一个aws问题我的一个客户案例(high traffic),请大家批判分析指点
谁来推荐个好用的distributed memory cachegit的官方文档真叫一个烂
问个socket close的问题Android memory leak
古德八,哪天我有空了咱实测一下吧Java Jobs
相关话题的讨论汇总
话题: tcp话题: 连接话题: 服务器话题: caching话题: reboot
进入Programming版参与讨论
1 (共1页)
L***s
发帖数: 1148
1
http://www.mitbbs.com/article_t0/JobHunting/32638431.html
一个web服务器与50,000个手机保持着TCP连接,
突然服务器崩溃重启,所有的TCP连接全部terminated
(不是半开,要重新从FIN开始握手)。
服务器瞬间要负担50,000个TCP重连请求,
问:服务器端应如何加速这一重连过程?
b********e
发帖数: 595
2
initcwnd 到10?
”服务器崩溃重启“是指server reboot还是crash了,如果是crash有可能 tcp_no_
metrics_save, reboot估计就无关了。
g*****g
发帖数: 34805
3
What's important for me was to do local caching on the user session, and
the restore can be possible without reading DB and reconstruction. If the
users will be
redistributed, a separate caching server like memcache can be used.

【在 L***s 的大作中提到】
: http://www.mitbbs.com/article_t0/JobHunting/32638431.html
: 一个web服务器与50,000个手机保持着TCP连接,
: 突然服务器崩溃重启,所有的TCP连接全部terminated
: (不是半开,要重新从FIN开始握手)。
: 服务器瞬间要负担50,000个TCP重连请求,
: 问:服务器端应如何加速这一重连过程?

L***s
发帖数: 1148
4
多谢,增大initcwnd应该是有效方法。
应该是reboot。不过缓存ssthresh这一点,虽然在reboot情况下没用,要是提一下还是
加分的。

【在 b********e 的大作中提到】
: initcwnd 到10?
: ”服务器崩溃重启“是指server reboot还是crash了,如果是crash有可能 tcp_no_
: metrics_save, reboot估计就无关了。

L***s
发帖数: 1148
5
多谢指点,豁然开朗!我还是没有系统设计经验,思维局限在单机。
有备份机memcache的话,可以对每个手机终端(IMEI)缓存ssthresh和cwnd,
理论上重启、TCP握手后,貌似server可以恢复到断之前的congestion windows size。
但client端TCP貌似还是要slow start?除非hack TCP协议。

【在 g*****g 的大作中提到】
: What's important for me was to do local caching on the user session, and
: the restore can be possible without reading DB and reconstruction. If the
: users will be
: redistributed, a separate caching server like memcache can be used.

g*****g
发帖数: 34805
6
I think recovery on application layer is more than enough. If immediate
recovery is critical, a failover strategy should be used instead. e.g. The
next heartbeat/request can be redirected by load balancer to a different
node and the user
session can be recovered from there, instead of waiting on the failed node.

【在 L***s 的大作中提到】
: 多谢指点,豁然开朗!我还是没有系统设计经验,思维局限在单机。
: 有备份机memcache的话,可以对每个手机终端(IMEI)缓存ssthresh和cwnd,
: 理论上重启、TCP握手后,貌似server可以恢复到断之前的congestion windows size。
: 但client端TCP貌似还是要slow start?除非hack TCP协议。

b********e
发帖数: 595
7

客户端应该不会slow start了,当时这个参数的调整就是google对web服务器用来解决
slow start的。发文章的两位里有一位还是华裔呦。
http://www.ietf.org/proceedings/10mar/slides/iccrg-4.pdf
tcp fastopen什么的没有仔细学习,好像是这两年才支持的,一直没关注了,不知道是
不是面试官希望的答案。
http://research.google.com/pubs/author39277.html
我不确认面试问的具体是tcp还是应用层面的问题,如果面的是应用的dev一般不改问这
么底层的东西。
应用层面应该goodbug 更有经验。

【在 L***s 的大作中提到】
: 多谢指点,豁然开朗!我还是没有系统设计经验,思维局限在单机。
: 有备份机memcache的话,可以对每个手机终端(IMEI)缓存ssthresh和cwnd,
: 理论上重启、TCP握手后,貌似server可以恢复到断之前的congestion windows size。
: 但client端TCP貌似还是要slow start?除非hack TCP协议。

l*****c
发帖数: 316
8
求问这些system design的问题看那些书或资源能够自学提高。

.

【在 g*****g 的大作中提到】
: I think recovery on application layer is more than enough. If immediate
: recovery is critical, a failover strategy should be used instead. e.g. The
: next heartbeat/request can be redirected by load balancer to a different
: node and the user
: session can be recovered from there, instead of waiting on the failed node.

g*****g
发帖数: 34805
9
这个主要还是来源于工作经验吧,各大公司的tech blog也不错,了解一下动态,有选
择性的深入了解。

【在 l*****c 的大作中提到】
: 求问这些system design的问题看那些书或资源能够自学提高。
:
: .

l*****c
发帖数: 316
10
有入门的书吗?本人web菜鸟一枚
多谢

【在 g*****g 的大作中提到】
: 这个主要还是来源于工作经验吧,各大公司的tech blog也不错,了解一下动态,有选
: 择性的深入了解。

1 (共1页)
进入Programming版参与讨论
相关主题
Java Jobs请教古老师一个aws问题
《Apache+MySQL+memcached+Perl开发高速开源网站》[PDF]谁来推荐个好用的distributed memory cache
怎么把一个Map放到queue里? (转载)问个socket close的问题
现在做手机网游,选什么数据库合适?古德八,哪天我有空了咱实测一下吧
小公司的网站也要用memcached之类的cache吗?redis set Time complexity: O(1) 怎么可能?
多研究些问题,比如这个网站的建设问题,大家来讨论一下backend是legecy系统,用户量会持续增加,用Java可以怎么解决?
有专门讲 message server performance 的资料吗如果做游戏后端的话,pike traffic怎么破
没有data store的model有什么用吗?为什么在我的电脑上编译好的程序,无法在其他电脑上运行?
相关话题的讨论汇总
话题: tcp话题: 连接话题: 服务器话题: caching话题: reboot