- 浏览: 916351 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (498)
- J2EE (52)
- 数据库 (17)
- java基础 (43)
- web技术 (19)
- 程序设计 (6)
- 操作系统 (18)
- IT资讯 (7)
- 我的IT生活 (12)
- 学习笔记 (9)
- Jquery (25)
- JavaScript (18)
- spring (40)
- Hibernate (12)
- Struts (10)
- YUI (2)
- Extjs (22)
- .net (0)
- Eclipse (10)
- 社会主义 (2)
- 服务器 (9)
- CSS (8)
- 网络安全 (16)
- 版本控制 (9)
- PHP (2)
- Oracle (42)
- SQL server (1)
- Mysql (11)
- 项目管理 (3)
- 开发工具使用 (10)
- SQL语句 (7)
- Perl (0)
- Shell (6)
- 漏洞 (4)
- ibatis (5)
- hacker (2)
- SQL注入 (6)
- Hacker工具 (2)
- 入侵和渗透 (7)
- 插件/组件 (2)
- 最爱开源 (5)
- 常用软件 (2)
- DOS (1)
- HTML (2)
- Android (9)
- CMS (1)
- portal (8)
- Linux (7)
- OSGI (1)
- Mina (5)
- maven (2)
- hadoop (7)
- twitter storm (2)
- sap hana (0)
- OAuth (0)
- RESTful (1)
- Nginx (4)
- flex (1)
- Dubbo (1)
- redis (1)
- springMVC (1)
- node.js (1)
- solr (2)
- Flume (1)
- MongoDB (2)
- ElasticSearch (1)
最新评论
-
M_drm:
请问要怎么设置浏览器才不报没权限呢?
用JS在页面调用本地可执行文件的方法(ACTIVEX) -
Alexniver:
官方文档。When importing data into I ...
mysql导入数据过慢 解决方法 -
camelwoo:
我记得 Criteria 可以做连接查询与子查询,也可以做分页 ...
Hibernate总结篇二 -
zhenglongfei:
楼主如果SubKeyName 这个节点不存在,怎么办??怎么用 ...
Java操作注册表 -
yxx676229549:
用log4j 2 了
logback
NGINX负载配置:
修改resin server.xml
tomcat服务器
10.110.5.151修改为
10.110.5.152修改为
jvm_route介绍
This module achieves session stickiness with the session cookie. If the session is not in the cookie or URL, the module will be a normal Round-Robin upstream module.
INSTALLATION
EXAMPLE
1.For resin
upstream backend
{
server 192.168.0.100 srun_id=a;
server 192.168.0.101 srun_id=b;
server 192.168.0.102 srun_id=c;
server 192.168.0.103 srun_id=d;
jvm_route $cookie_JSESSIONID
;
}
DIRECTIVES
jvm_route
syntax: jvm_route $cookie_COOKIE[ |session_url] [ reverse]
default: none
context: upstream
description:
'$cookie_SESSION_COOKIE' specifies the session cookie name(0.7.24+). 'session_url' specifies a different session name in the URL when the client does not accept a cookie. The session name is case-insensitive. In this module, if it does not find the session_url, it will use the session cookie name instead. So if the session name in cookie is the name with its in URL, you don't need give the session_url name.
With scanning this cookie, the module will send the request to right backend server. As far as I know, the resin's srun_id name is in the head of cookie. For example, requests with cookie value 'a* * * ' are always sent to the server with the srun_id of 'a'. But tomcat's JSESSIONID is opposite, which is like '* * * .a'. The parameter of 'reverse' specifies the cookie scanned from tail to head.
If the request fails to be sent to the chosen backend server, It will try another server with the Round-Robin mode until all the upstream servers tried. The directive proxy_next_upstream can specify in what cases the request will be transmitted to the next server. If you want to force the session sticky, you can set 'proxy_next_upstream off'.
server
Every syntax is the same with the official directive except the parameter of 'srun_id' which identified the backend JVM's name by cookie. The default srun_id's value is 'a';
NOTE
This is a third-party module. And you need careful test before using this module in your production environment.
Questions/patches may be directed to Weibin Yao, yaoweibin@gmail.com.
upstream backend {#集群服务器 server 127.0 . 0.1 : 8080 srun_id=resinserver1; server 127.0 . 0.1 : 8081 srun_id=resinserver2; jvm_route $cookie_JSESSIONID|sessionid;#session共享 }
修改resin server.xml
<server id="a" address="192.168.6.121" port="6800"> <!-- server2 address=192.168.6.162 --> <http id="" port="8080"/> </server> <server id="b" address="192.168.6.121" port="6801"> <!-- server2 address=192.168.6.162 --> <http id="" port="8081"/> </server>
tomcat服务器
10.110.5.151修改为
<Engine name=”Catalina” defaultHost=”localhost” jvmRoute=”resinserver1”>
10.110.5.152修改为
<Engine name=”Catalina” defaultHost=”localhost” jvmRoute=”resinserver2”>
jvm_route介绍
This module achieves session stickiness with the session cookie. If the session is not in the cookie or URL, the module will be a normal Round-Robin upstream module.
INSTALLATION
EXAMPLE
1.For resin
upstream backend
{
server 192.168.0.100 srun_id=a;
server 192.168.0.101 srun_id=b;
server 192.168.0.102 srun_id=c;
server 192.168.0.103 srun_id=d;
jvm_route $cookie_JSESSIONID
;
}
DIRECTIVES
jvm_route
syntax: jvm_route $cookie_COOKIE[ |session_url] [ reverse]
default: none
context: upstream
description:
'$cookie_SESSION_COOKIE' specifies the session cookie name(0.7.24+). 'session_url' specifies a different session name in the URL when the client does not accept a cookie. The session name is case-insensitive. In this module, if it does not find the session_url, it will use the session cookie name instead. So if the session name in cookie is the name with its in URL, you don't need give the session_url name.
With scanning this cookie, the module will send the request to right backend server. As far as I know, the resin's srun_id name is in the head of cookie. For example, requests with cookie value 'a* * * ' are always sent to the server with the srun_id of 'a'. But tomcat's JSESSIONID is opposite, which is like '* * * .a'. The parameter of 'reverse' specifies the cookie scanned from tail to head.
If the request fails to be sent to the chosen backend server, It will try another server with the Round-Robin mode until all the upstream servers tried. The directive proxy_next_upstream can specify in what cases the request will be transmitted to the next server. If you want to force the session sticky, you can set 'proxy_next_upstream off'.
server
Every syntax is the same with the official directive except the parameter of 'srun_id' which identified the backend JVM's name by cookie. The default srun_id's value is 'a';
NOTE
This is a third-party module. And you need careful test before using this module in your production environment.
Questions/patches may be directed to Weibin Yao, yaoweibin@gmail.com.
发表评论
-
监控应用服务器---使用JMX监控Tomcat
2015-03-11 18:19 762前言:做了一个监控应用服务器的项目(支持Tocmat、WebS ... -
使用Java调用百度、google搜索
2013-10-20 21:49 1492使用Java调用百度搜索 http://yangshangch ... -
PHP+JSON+瀑布流模式+三种风格+无限拖拽方式
2013-03-01 12:37 993http://guangqiang.iteye.com/blo ... -
openOffice 把word转换成html
2013-03-01 12:30 1181[url]http://jadethao.iteye.com/ ... -
Web开发的第一课 - License
2013-01-20 13:13 1233http://fogtower.iteye.com/blog/ ... -
使用EhCache和Spring AOP实现计算结果缓存
2012-08-07 10:47 1061原文:http://kim-miao.iteye.com/bl ... -
Tomcat6.0控制台配置
2012-08-02 18:01 1448原文网址:http://apps.hi.baidu.com/s ... -
汉字/英文字符长度判断--JS版与Java方法版
2012-07-18 17:54 2104http://www.blogjava.net/loyalgl ... -
用java流方式判断文件类型
2012-06-28 09:50 1758原文:http://rainsilence.iteye.com ... -
tomcat,Jboss,weblogic区别、容器的作用(转)
2012-03-05 22:35 1004http://hi.baidu.com/chssheng200 ... -
Web开发中需要了解的东西
2012-01-02 23:17 1160来自:http://coolshell.cn/ar ... -
Webservice调用方式:axis,soap详解
2011-11-29 12:41 1545转自:[url] http://blog.csdn.net/b ... -
Cookie与会话--Session与SSO的实现细节研究
2011-10-11 00:12 12570.背景 最近 ... -
weblogic数据库连接池断了之后的解决方案
2011-09-07 13:30 2737几种异常: 1、Failed to setAutoCommi ... -
常用默认端口号
2010-10-14 08:44 2216网络层---数据包的包格 ... -
配置welcome-file-list跳转
2010-10-13 16:23 1245web.xml里是 <welcome-file> ... -
java自动生成验证码插件-kaptcha
2010-09-14 01:03 1982今天无意间发现了一个很好用的验证码插件,java版的,很不错的 ... -
JAVA实现屏幕抓图 远程桌面控制
2010-08-04 10:56 1188主要使用的是java.util.Robot类来捕获屏幕 ... -
Linux VPS下SSH常用命令
2010-06-22 10:33 1521学习完如何使用Putty远程(SSH)管理Linux VPS, ... -
一次Resin服务器测试实例(图)
2010-06-13 14:10 26671 前言 记得有次面试,考官问道“你认为对Resin服务器发 ...
相关推荐
【标题】"nginx-upstream-jvm-route-1.15" 涉及的核心知识点是Nginx的upstream模块与JVM路由的整合,特别针对Nginx 1.15版本。这个项目旨在解决在配置Nginx时遇到的特定错误提示“nginx: [emerg] invalid parameter ...
此资源有两个文件,含 nginx-upstream-jvm-route 和 nginx 对应版本,都是tar.gz文件。 安装方法网上很多就不写了,亲测可用。 不用担心版本不匹配造成安装失败,再浪费积分去到处下载尝试的烦恼。 此资源有两个文件...
nginx_upstream_jvm_route 是一个 Nginx 的扩展模块,用来实现基于 Cookie 的 Session Sticky 的功能。 安装方法(进入Nginx源码目录): #patch -p0 < /path/to/this/directory/jvm_route.patch # ./configure -...
标题 "nginx-upstream-jvm-route nginx共享Session" 涉及到的是在使用Nginx作为反向代理服务器时,如何实现多个Java应用服务器(通常指的是JVM实例)之间的Session共享。这通常在构建高可用性和负载均衡的Web服务...
nginx_upstream_jvm_route 是一个 Nginx 的扩展模块,用来实现基于 Cookie 的 Session Sticky 的功能。 安装方法(进入Nginx源码目录): #patch -p0 < /path/to/this/directory/jvm_route.patch # ./configure -...
"nginx-upstream-jvm-route-0.1.tar.gz"这个压缩包包含了实现这一功能的相关配置和脚本。在解压后的"nginx_upstream_jvm_route"目录中,我们可以找到Nginx的配置示例、Java应用程序的部署配置以及可能的脚本文件。...
linux nginx nginx_upstream_jvm_route
标题中的"nginx-1.19.3_nginx-http-flv-module.rar"表明这是一个关于Nginx服务器的软件包,特别地,它包含了Nginx的1.19.3版本,并且已经集成了`nginx-http-flv-module`模块。这个模块是用于支持HTTP FLV(Flash ...
标题中的"fastdfs-nginx-module_v1.16.tar.gz"是一个开源项目,它是一个用于Nginx服务器的模块,旨在使Nginx能够与FastDFS文件存储系统无缝集成。FastDFS是一个轻量级的开源分布式文件系统,适用于互联网和企业内部...
总结来说,fastdfs-nginx-module_v1.16.tar.gz是一个强大的工具,它将FastDFS的文件存储能力与Nginx的Web服务器特性完美结合,实现了高效、安全的文件服务。对于需要处理大量文件上传下载的Web应用,它是理想的选择...
nginx sticky是nginx的module,可以实现基于cookie的负载均衡。 下载后,在编译安装nginx时,用--add-module选项,指到sticky所在目录。类似命令如下: ./configure --prefix=/usr/local/nginx-1.6.0 --add-module=...
a)在server1 上安装配置 nginx + nginx_upstream_jvm_route - 22 - b)分别在两台机器上 安装 resin - 22 - c)配置两台机器 的 resin - 23 - d)整合 ngxin resin - 24 - e)测试,打开浏览器,输入 ...
代码如下:cd /optwget ... /opt/nginx_upstream_jvm_route/jvm_route.patc
本文将详细讲解如何使用Nginx-1.6.2作为反向代理和负载均衡器,结合Memcached-1.2.6实现Session共享,并在Tomcat7应用服务器集群中部署此架构。 首先,Nginx是一款轻量级的Web服务器/反向代理服务器,以其高效、...
在给定的压缩包文件“Nginx-GUI-For-Windows-x64-v1.6.zip”中,包含了一个专为Windows 64位系统设计的Nginx图形用户界面(GUI)版本,版本号为1.6。这个GUI工具的主要目的是简化Nginx的配置、启动和状态监控过程,...
- **反向代理(Reverse Proxy)**:Nginx可以作为反向代理服务器,将客户端请求转发到后端的应用服务器,提高系统性能并实现负载均衡。 - **负载均衡(Load Balancing)**:通过Nginx将请求分配给多台后端服务器,...
《Nginx-Prometheus-Exporter:实现高效Web服务器监控》 在现代互联网服务中,监控系统的性能和稳定性至关重要。Nginx作为广泛使用的反向代理和负载均衡服务器,其性能指标的实时监控能帮助我们及时发现并解决问题...
首先,解压这些文件到一个合适的目录,例如 `/usr/local/src/nginx-modules`。然后,按照每个模块的文档指示进行编译和安装。通常,这会涉及到修改Nginx的配置文件`/etc/nginx/nginx.conf`,并将模块的配置行添加到...
"tomcat9+tomcat-cluster-redis-session-manager_4.0.zip"这个文件组合涉及到的是在Tomcat 9上实现负载均衡以及使用Redis作为Session管理器的高级配置。 首先,Tomcat 9是Apache Tomcat服务器的一个版本,它是Java ...