免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2842 | 回复: 2
打印 上一主题 下一主题

如何在LVS请求分发下保存WEB的session [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-11-19 14:34 |只看该作者 |倒序浏览
前端有台A调度器负责分发客户端的访问到后端B.C两台服务器上。
当USER通过LVS调度器访问web服务器的时候,调度器把请求分发到了B这台机器上。
这样当USER在600秒内第二次打开WEB客户端的时候不要求输入用户和密码就能直接登陆论坛

现在遇到这样个问题

当USER第一次登陆连接的是B这台服务器,但是为什么USER第二次登陆还是要求要输入用户名和密码,根本没有保存
我怀疑是前端LVS把请求分发到了C这台服务器上面去了,那么USER和C就建立了一个新的session,原来和B的那个会话就断开了,不知道这样的问题怎么解决

论坛徽章:
0
2 [报告]
发表于 2009-11-19 16:58 |只看该作者
F5已经实现了这个功能,LVS目前好像还不行

要不章博士出的那个盒子怎么还没这个功能呢。

论坛徽章:
0
3 [报告]
发表于 2009-11-20 01:10 |只看该作者

回复 #1 werll 的帖子

这个问题就是要设置会话的保持时间

       -p, --persistent [timeout]
              Specify that a virtual service is persistent. If this option  is
              specified, multiple requests from a client are redirected to the
              same real server selected for the  first  request.   Optionally,
              the  timeout  of  persistent  sessions may be specified given in
              seconds, otherwise the default of 300 seconds will be used. This
              option  may be used in conjunction with protocols such as SSL or
              FTP where it is important that clients consistently connect with
              the same real server.

              Note:  If  a  virtual  service is to handle FTP connections then
              persistence must be set for the virtual service if Direct  Rout-
              ing  or  Tunnelling is used as the forwarding mechanism. If Mas-
              querading is used in conjunction with an FTP service  than  per-
              sistence  is not necessary, but the ip_vs_ftp kernel module must
              be used.  This module may be manually inserted into  the  kernel
              using insmod(.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP