Nginx模块之SessionSticky
0 工作原理
1 下载 Session
Sticky
2 安装模块
-V 命令查看当时编译的参数。在参数后面追加安装 Session Sticky 模块的参数,
3 激活模块
Sticky模块。
4 可用选项
The "sticky" command can take several arguments to control its behaviour:
|
Configuration
|
Description
|
Parameters
|
Default Value
|
|
name
|
the name of the cookie used to track the persistant upstream srv
|
can be any string
|
"route"
|
|
domain
|
the domain in which the cookie will be valid
|
can be any string
|
nothing. Let the browser handle this.
|
|
path
|
the path in which the cookie will be valid
|
can be any path
|
nothing. Let the browser handle this.
|
|
expires
|
the validity duration of the cookie
|
must be a duration greater than one second
|
nothing. It's a session cookie
|
|
hash
|
the hash mechanism to encode upstream server. It cant' be used with hmac
|
md5|sha1
|
md5
|
|
hmac
|
The HMAC hash mechanism to encode upstream server. It's like the hash mechanism but it uses hmac_key to secure the hashing. It can't be used with hash.
|
md5|sha1
|
none
|
|
hmac_key
|
The key to use with hmac. It's mandatory when hmac is set.
|
can be any string
|
none
|
|
no_fallback
|
When this flag is set, nginx will return a 502 (Bad Gateway orProxy Error) if a request comes with a cookie and the corresponding backend is unavailable.
|
no arguments
|
none
|
参考资料
sticky 模块实现基于 cookie 的负载均衡
Nginx模块之SessionSticky的更多相关文章
- 结合源码看nginx-1.4.0之nginx模块组织结构详解
目录 0. 摘要 1. nginx模块组织结构 2. nginx模块数据结构 3. nginx模块初始化 4. 一个简单的http模块 5. 小结 6. 参考资料 0. 摘要 nginx有五大优点:模 ...
- 【转】Nginx模块开发入门
转自: http://kb.cnblogs.com/page/98352/ 结论:对Nginx模块开发入门做了一个helloworld的示例,简单易懂.也有一定的深度.值得一看. Nginx模块开发入 ...
- Nginx模块开发入门
前言 Nginx是当前最流行的HTTP Server之一,根据W3Techs的统计,目前世界排名(根据Alexa)前100万的网站中,Nginx的占有率为6.8%.与Apache相比,Nginx在高并 ...
- Nginx模块fastcgi_cache的几个注意点 转
Nginx模块fastcgi_cache的几个注意点 去年年底,我对nginx的fastcgi_cache进行摸索使用.在我的测试过程中,发现一些wiki以及网络上没被提到的注意点,这里分享一下. ...
- 开发Nginx模块
开发Nginx模块 前面的哪些话 关于Nginx模块开发的博客资料,网上很多,很多.但是,每篇博客都只提要点,无法"step by step"照着做,对于初次接触Nginx开发的同 ...
- [转] Nginx模块开发入门
前言 Nginx是当前最流行的HTTP Server之一,根据W3Techs的统计,目前世界排名(根据Alexa)前100万的网站中,Nginx的占有率为6.8%.与Apache相比,Nginx在高并 ...
- nginx模块开发获取post参数
> 您好!> 我想请问下nginx模块里面怎么获取post参数,能有具体的代码更好!谢谢> 对于 "application/x-www-form-urlencode ...
- Nginx模块开发入门(转)
前言 Nginx是当前最流行的HTTP Server之一,根据W3Techs的统计,目前世界排名(根据Alexa)前100万的网站中,Nginx的占有率为6.8%.与Apache相比,Nginx在高并 ...
- Nginx模块开发入门(转)
前言 Nginx是当前最流行的HTTP Server之一,根据W3Techs的统计,目前世界排名(根据Alexa)前100万的网站中,Nginx的占有率为6.8%.与Apache相比,Nginx在高并 ...
随机推荐
- Codeforces Round #430 D. Vitya and Strange Lesson
Today at the lesson Vitya learned a very interesting function - mex. Mex of a sequence of numbers is ...
- 基于FPGA的数字识别的实现
欢迎大家关注我的微信公众号:FPGA开源工作室 基于FPGA的数字识别的实现二 作者:lee神 1 背景知识 1.1基于FPGA的数字识别的方法 通常,针对印刷体数字识别使用的算法有:基于模版 ...
- 数组的遍历你都会用了,那Promise版本的呢
这里指的遍历方法包括:map.reduce.reduceRight.forEach.filter.some.every因为最近要进行了一些数据汇总,node版本已经是8.11.1了,所以直接写了个as ...
- jquery easyui panel title文字格式设置
$('#txtLeftPercent').panel({ title: '剩余权重:' + '<b style="color:red">' + 100 + '%< ...
- JavaScript数据结构和算法----栈
前言 栈是一种遵循后进先出(LIFO)原则的有序集合,新添加的或待删除的元素都保存在栈的末尾,称作栈顶,另外一端就叫栈底.在栈里,新元素都靠近栈顶,旧元素都接近栈底.可以想象桌上的一叠书,或者厨房里的 ...
- linux tar解压命令
linux下使用tar命令 解压语法:tar [主选项+辅选项] 文件或者目录 使用该命令时,主选项是必须要有的,它告诉tar要做什么事情,辅选项是辅助使用的,可以选用.主选项:c 创建新的档案文件. ...
- 使用ffmpeg转码时遇到aac报错
今天尝试用ffmpeg转一个视频的格式,结果报出这个错误: The encoder 'aac' is experimental but experimental codecs are not enab ...
- ftp:connect:未知错误号
Linux下使用ftp命令时,提示:ftp: connect :未知错误号解决方法:service iptables stop或/etc/rc.d/init.d/iptables stop
- dephi FillChar 的几种写法
//在 delphi 新版中, char 已经是双字节了.故应该重新自己写一个函数,取名为 FillByte ,才无歧义. procedure TForm1.Button2Click(Sender: ...
- Bootstrap3 表格-基本表格
为任意 <table> 标签添加 .table 类可以为其赋予基本的样式 - 少量的内补(padding)和水平方向的分隔线.这种方式看起来很多余!?但是我们觉得,表格元素使用的很广泛,如 ...