zoukankan      html  css  js  c++  java
  • sticky session 粘性会话

     New Elastic Load Balancing Feature: Sticky Sessions | AWS News Blog https://amazonaws-china.com/cn/blogs/aws/new-elastic-load-balancing-feature-sticky-sessions/

    New Elastic Load Balancing Feature: Sticky Sessions

    by Jeff Barr | on 07 APR 2010 | in Amazon EC2LaunchNews | Permalink |  Share

    Amazon EC2’s Elastic Load Balancing feature just became a bit more powerful. Up until now each load balancer had the freedom to forward each incoming HTTP or TCP request to any of the EC2 instances under its purview. This resulted in a reasonably even load on each instance, but it also meant that each instance would have to retrieve, manipulate, and store session data for each request without any possible benefit from locality of reference.

    Suppose two separate web browsers each request three separate web pages in turn. Each request can go to any of the EC2 instances behind the load balancer, like this:

    When a particular request reaches a given EC2 instance, the instance must retrieve information about the user from state data that must be stored globally. There’s no opportunity for the instance to cache any data since the odds that several requests from the same user / browser will go down as more instances are added to the load balancer.

    With the new sticky session feature, it is possible to instruct the load balancer to route repeated requests to the same EC2 instance whenever possible.

    In this case, the instances can cache user data locally for better performance. A series of requests from the user will be routed to the same EC2 instance if possible. If the instance has been terminated or has failed a recent health check, the load balancer will route the request to another instance. Of course, in a real world scenario, there would be more than two users, and the third EC2 instance wouldn’t be sitting idle.

    Full information on this new feature can be found in the Elastic Load Balancer documentation.

    Update: Shlomo Swidler wrote a really nice post on Elastic Load Balancing with Sticky Sessions. I’d encourage you to check it out to learn more about why sticky sessions can improve your application.

    — Jeff;

     
     
     
  • 相关阅读:
    java 实现一段文字中,出现次数最多的字
    json 字符串 <----> json 对象
    农场销售
    IDEA Tomcat配置 VM Option
    java用JSONObject生成json
    面向对象
    java读取 properties配置文件
    Jquery span标签的取值赋值
    Oracle 分析函数 over
    gitee指令集合
  • 原文地址:https://www.cnblogs.com/rsapaper/p/7840703.html
Copyright © 2011-2022 走看看