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;

 
 
 

sticky session 粘性会话的更多相关文章

  1. Nginx+Memcached+Tomcat集群配置实践(Sticky Session)

    准备工作 创建一个简单的web应用,名为session.其中有两个页面,分别如下所示: 页面login.jsp <%@ page language="java" conten ...

  2. cookie、session和会话保持

    1.会话 在程序中,会话跟踪是很重要的事情.理论上,一个已登录用户,在这次登录后进行的所有请求操作都应该属于同一个会话,而另一个用户的所有请求操作则应该属于另一个会话,二者不能混淆.例如,用户 A 在 ...

  3. Java EE : 三、图解Session(会话)

    目录 Java EE : 一.图解Http协议 Java EE : 二.图解 Cookie(小甜饼) Java EE : 三.图解Session(会话) 概述 一.Session由来 二.Sessio ...

  4. {Django基础八之cookie和session}一 会话跟踪 二 cookie 三 django中操作cookie 四 session 五 django中操作session

    Django基础八之cookie和session 本节目录 一 会话跟踪 二 cookie 三 django中操作cookie 四 session 五 django中操作session 六 xxx 七 ...

  5. 用position: sticky 实现粘性元素区域悬浮效果(转)

    用position: sticky 实现粘性元素区域悬浮效果 原创 2017年08月02日 20:04:13 161 在一些很长的表格中,常常会使用表头悬浮的设计以方便阅读,即在表格离开窗口之前,表头 ...

  6. AWS ELB Sticky Session有问题?别忘了AWSELB cookie

    我们的产品中有两个Module,分别部署在独立的Linux机器上,Module 1需要向Module 2发起Http请求来获得服务.由于Module 2有多台,因此我们会在Module 2前部署一台负 ...

  7. sticky,粘性定位

    position:sticky,粘性定位:可以说是relative和fixed的结合: 滑动过程中,元素在显示窗口内则在其本身的位置,超出元素所在位置则显示在设定的sticky位置. 使用: #id ...

  8. Nginx+ 多个Memcached+ 多个Tomcat集群配置来实现 sticky Session

    假如有 大于2 台的Tomcat servers,如何实现sticky session特点的高可靠web 服务? 方案设计: 前端使用nginx(最好是淘宝的 tengine)作为we 流量分发器,向 ...

  9. Laravel处理session(会话)的方法详解

    在Web应用程序中,有必要识别跨越请求的用户并为每个用户保存数据,为此,像Laravel这样的框架提供了一种称为会话的机制.本篇文章就来为大家介绍关于Laravel处理session(会话)的方法. ...

随机推荐

  1. 一款基于bootstrap的文件上传插件,现在很多手机webapp都在用

    官网:http://plugins.krajee.com/file-input

  2. Windows Phone 8 与 windows 8 开发技术概览

    目前来说Windows phone 8的开发者 大家都是走战斗在在技术朋友,相信大家在做Windows Phone 8开发的同时也在关注Windows 8,我相信很多开发者一定是在 Windows 8 ...

  3. C# 生成二维码(带Logo)

    C# 生成二维码(带Logo) 第一种方式 我们需要引用 ThoughtWorks.QRCode.dll  生成带logo二维码(framework4.0以上) 下载地址:https://pan.ba ...

  4. SilverLight:基础控件使用(5)-TreeView控件-基本使用

    ylbtech-SilverLight-Basic-Control:基础控件使用(5)-TreeView控件-基本使用 前台编辑 后台逐个添加 后台绑定数据源 1.A,返回顶部TreeView控件(树 ...

  5. vue生命周期的栗子

    vue生命周期的栗子注意触发vue的created事件以后,this便指向vue实例,这点很重要 <!DOCTYPE html><html><head><me ...

  6. 转:mybatis——select、insert、update、delete

    一.select <!-- 查询学生,根据id --> <select id="getStudent" parameterType="String&qu ...

  7. SWTBOK測试实践系列(5) -- 项目中使用手动和自己主动化的策略

    手动測试和自己主动化測试永远是一个非常热门的话题.自己主动化也一直被人们捧上神坛.自己主动化測试和手动測试从技术上来说本质事实上都是測试用例设计.仅仅只是终于形式一个是人工运行,一个是代码运行罢了.这 ...

  8. 【西祠日志】【07】努力努力,找资料,思考,怎么做asp图片上传

    [西祠日志][07]努力努力,找资料.思考.怎么做asp图片上传  (2015.07.23周四) 今天忘了带本子.直接写在书上了笔记,晚点还是夹在本子里. 学了这么久的web应用,一直都没时间去做一点 ...

  9. C和C++代码精粹笔记1

    CH1 更好的C 运算符重载规定,必须有一个为用户自定义类型 一些输出没注意到的函数: float x = 123.456, y = 12345; //cout.precision(2); //显示两 ...

  10. Num 34 : HDOJ : 1205 吃糖果 [ 狄利克雷抽屉原理 ]

           抽屉原理:          桌上有十个苹果,要把这十个苹果放到九个抽屉里,不管如何放,我们会发现至少会有一个抽屉里面至少放两个苹果.          这一现象就是我们所说的" ...