×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

My understanding is ...

本文发表在 rolia.net 枫下论坛... http is a sessionless protocol. You send a request, I give you an answer, that's it, we are done. Requests are independent with each other. (Well, http 1.1 supports persistant connection, but that's solely for alleviating the expensive connection establishment, not for keeping session. Each request on a single connection is still independent with other requests on the same connection.)

So in order to keep session, we have to use other means, eg., cookies or hidden fields, etc. It is the web server's responsability to retrieve the session information from cookies, hidden fields, etc., by querying database (or whatever storage you choose). So the web servers need to query the same database or the databases need to be kept in sync if they are different.

https connections are persistant, which means it will be a bit tricky to migrate session to other web server if one web server is down in the middle of an established connection.

Anyway, these are just my understanding. Please correct me if you find anything wrong, that'll be greatly appreciated. Pretty interesting topic indeed.更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / 哪位朋友有WEB方面动态负载平衡的经验么?我记得有好几种方案,想了解一下细节,多谢赐教!
    • load balancing could be done by software and/or hardware, the best solution that i have used is alteon content switch.
      • 有没有这方面的资料?我有几个问题,比如如何处理SESSION,如何处理数据同步等? 谢了
    • websphere performance pack! www.software.ibm.com
      • thx
    • I am using
      I am using Cisco LocalDirector ( http://www.cisco.com/univercd/cc/td/doc/product/iaabu/localdir/ ). These are two URLs which may be usful for you. http://www.loadbalancing.net/ http://www.webtechniques.com/archives/1998/05/engelschall/
      • thx...
    • There're some network solutions and some pure web sysytem solution
      1. Network load balance, that's the job for 3rd or 4th layer switch, or some router can do these, and ATM switch always has this function.

      2.Local DNS load balance, that's cheap way, but not so good performance. and better take the DNS server into a cluster or HA system. and for intranet DHCP's load balance also are considerable. and in some huge network and web system, even DNS-self also be balanced. this is mainly part of web system load balance.

      3.storage load balance, such as Andrew File Sytem(AFS)--it's very like NFS. and Cache file load balance. it's very important part for web system performmance.

      websphere performance pack is a excellent solution, it's called IBM network e-dispatch in previous, and now called websphere edge sever.
      • Thanks a lot. 那么是如何处理SESSION,如何处理数据同步呢?
        • APPLICATION LAYER的 SWITH 可以根据COOKIE,SSL SESION ID,VIP等信息维护SESSION 的连续
          • 比如说我有3台WEB SERVER, 第一次访问时SESSION创建在1号SERVER上,第二次访问时被指定到2号SERVER上,那这个SESSION怎么办,能被自动同步么?我想不明白。
            • 这些SWITCH会记录第一次的SERVER,在第二次CLIENT访问时它会把PACKET发到上次哪个SERVER
              • 那样效率岂不是不高,另外这个SWITH本身的负载也很高啊。
                • 产品是用硬件实现的,
            • 等第二次访问时,就是一个新的session了。
              • 不是的,一些COOKIE和SSL SESSION ID都在两次访问是一样的
            • My understanding is ...
              本文发表在 rolia.net 枫下论坛... http is a sessionless protocol. You send a request, I give you an answer, that's it, we are done. Requests are independent with each other. (Well, http 1.1 supports persistant connection, but that's solely for alleviating the expensive connection establishment, not for keeping session. Each request on a single connection is still independent with other requests on the same connection.)

              So in order to keep session, we have to use other means, eg., cookies or hidden fields, etc. It is the web server's responsability to retrieve the session information from cookies, hidden fields, etc., by querying database (or whatever storage you choose). So the web servers need to query the same database or the databases need to be kept in sync if they are different.

              https connections are persistant, which means it will be a bit tricky to migrate session to other web server if one web server is down in the middle of an established connection.

              Anyway, these are just my understanding. Please correct me if you find anything wrong, that'll be greatly appreciated. Pretty interesting topic indeed.更多精彩文章及讨论,请光临枫下论坛 rolia.net
        • the question just little larger than we can talk here. Maybe just because my poor language ability to express these briefly. But:
          I thought we 'd better talk about it in some detail conditions, such as a concrete software, because these techs are still under developing, each firm use diff tech to perform. you'd better get some books for reading. BTW, most firms should suggest use some server to handle these, in stead of swtich and router, because S/R still work as a server and with limited functions. but it's fast and good as an assitant method to control network stream.

          Good Luck for studing
          • Yeah, I think so. Anyway, thank you very much.
    • I used Alteon Layer 4-7 switch.If seesion,maybe you will use layer 7, you have to lost performance.DNS is good,but if one of your server down, dns will not be refreshed at now. so client will request this server again.
      • I know DNS is the simple solution but not the best one, right?
        • DNS Rotation is not the best solution,but it is free.If not very important project(e-commerce..),it is enough.
          Most of top 10 china ICP are using Alteon 180s Load balancer. Sohu.com is using dns rotation and Alteon. Sina,Nease,8848 are using Alteon.
    • Is this Ted who usually play soccer with us? FYI: MS solution is WEB SERVER FARM
      which is basing on cluster service and more. check here
      http://www.microsoft.com/technet/treeview/default.asp?url=/TechNet/prodtechnol/iis/deploy/config/webclust.asp
      • Yes, that is me. Which Simon are you? The Simon from Tianjin or the thiner one? : )
        • This is TJ simon, maybe see you this saturday.
          • Hi, Simon, I hope so.
    • microsoft: NT WLBS OR 2000 NLB, not bad; cisco solution is quite popular, easy to use.
      • Ok, thx, any documents?