- 浏览: 498961 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (250)
- concurrent (11)
- io (1)
- CI (10)
- linux (57)
- windows (2)
- java (38)
- mac (4)
- eclipse (9)
- db (13)
- python (5)
- groovy (5)
- flex (7)
- hibernate (5)
- odb (8)
- netbeans (1)
- web (31)
- book (14)
- erlang (2)
- communication (2)
- virtualization (5)
- jUnit (0)
- jsf (1)
- perl (1)
- java jax-rs (5)
- Jenkins (2)
- Jenkins Plugin (3)
- android (2)
- git (1)
- big data (0)
- 试读 (1)
最新评论
-
yzzy4793:
讲的很清楚,明白
同步synchronized方法和代码块 -
aa51513:
中文乱码式硬伤
Jersey2.x对REST请求处理流程的分析 -
feiwomoshu1991:
...
同步synchronized方法和代码块 -
marshan:
启动失败的原因是加载的类版本冲突,因此你首先要保证依赖的版本和 ...
richfaces中facelet版本升级到2时的典型错误和解决办法 -
zhaohang6688:
请问我按照你的方式修改还是报错 错误信息还是这个 是为什么啊 ...
richfaces中facelet版本升级到2时的典型错误和解决办法
Load Balancer (Nginx)
/ \
Cluster1 Cluster2
/ \ / \
Tomcat1 Tomcat2 Tomcat3 Tomcat4
memcached
下载:
Ubuntu:
sudo apt-get install memcached
Windows:
http://www.kuaipan.cn/file/id_18237169873244609.htm
启动服务器:
memcached -p 11211 -u memcached -m 64 -M -vv
客户端访问:
telnet localhost 11211
Command | Description | Example |
get | Reads a value | get mykey |
set | Set a key unconditionally | set mykey 0 60 5 |
add | Add a new key | add newkey 0 60 5 |
replace | Overwrite existing key | replace key 0 60 5 |
append | Append data to existing key | append key 0 60 15 |
prepend | Prepend data to existing key | prepend key 0 60 15 |
incr | Increments numerical key value by given number | incr mykey 2 |
decr | Decrements numerical key value by given number | decr mykey 5 |
delete | Deletes an existing key | delete mykey |
flush_all | Invalidate specific items immediately | flush_all |
Invalidate all items in n seconds | flush_all 900 | |
stats | Prints general statistics | stats |
Prints memory statistics | stats slabs | |
Prints memory statistics | stats malloc | |
Print higher level allocation statistics | stats items | |
stats detail | ||
stats sizes | ||
Resets statistics | stats reset | |
version | Prints server version. | version |
verbosity | Increases log level | verbosity |
quit | Terminate telnet session | quit |
http://code.google.com/p/memcached-session-manager/
https://github.com/magro/msm-sample-webapp
Nginx
http { server { location / { root html; index index.html index.htm; proxy_pass http://127.0.0.1; } upstream 127.0.0.1 { server 127.0.0.1:8080 weight=1; server 127.0.0.1:8081 weight=2; } }
tomcat
server.xml
D:\tomcat-7.0.34_1
port:8005
D:\tomcat-7.0.34_2
port:8006
<Server port="8005" shutdown="SHUTDOWN">
D:\tomcat-7.0.34_1
port:8080
D:\tomcat-7.0.34_2
port:8081
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
D:\tomcat-7.0.34_1
port:8009
D:\tomcat-7.0.34_2
port:9009
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
D:\tomcat-7.0.34_1
jvmRoute:tomcat7-1
D:\tomcat-7.0.34_2
jvmRoute:tomcat7-2
<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat7-1">
D:\tomcat-7.0.34_1
port:4000
D:\tomcat-7.0.34_2
port:4001
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8"> <Manager className="org.apache.catalina.ha.session.DeltaManager" expireSessionsOnShutdown="false" notifyListenersOnReplication="true" /> <Channel className="org.apache.catalina.tribes.group.GroupChannel"> <Membership className="org.apache.catalina.tribes.membership.McastService" address="228.0.0.4" port="45564" frequency="500" dropTime="3000" /> <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver" address="auto" port="4000" autoBind="100" selectorTimeout="5000" maxThreads="6" /> <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter"> <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender" /> </Sender> <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector" /> <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor" /> </Channel> <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter="" /> <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve" /> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer" tempDir="/tmp/war-temp/" deployDir="/tmp/war-deploy/" watchDir="/tmp/war-listen/" watchEnabled="false" /> <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener" /> <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener" /> </Cluster>
D:\tomcat-7.0.34_1
docBase:D:/tomcat-7.0.34_1/webapps/test
D:\tomcat-7.0.34_2
docBase:D:/tomcat-7.0.34_2/webapps/test
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Context docBase="D:/tomcat-7.0.34_1/webapps/test" path="" reloadable="true"> <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager" memcachedNodes="n1:localhost:11211" requestUriIgnorePattern=".*/.(png|gif|jpg|css|js)$" sessionBackupAsync="false" sessionBackupTimeout="100" transcoderFactoryClass="de.javakaffee.web.msm.serializer.javolution.JavolutionTranscoderFactory" copyCollectionsForSerialization="false"/> </Context> </Host>
D:\tomcat-7.0.34_1\webapps\test\index.jsp
<%@ page contentType="text/html; charset=GBK" %> <%@ page import="java.util.*" %> <html> <head> <title>Cluster Test</title> </head> <body> <% System.out.println(session.getId()); out.println("<br> SESSION ID:" + session.getId()+"<br>"); %> </body> </html>
D:\tomcat-7.0.34_1\webapps\test\WEB-INF\web.xml
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>test</display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <distributable/> </web-app>
发表评论
-
Apache benchmarking
2013-11-17 16:15 1208NAME ab - Apache HTTP ser ... -
dojo 动态创建下拉菜单和输入框
2013-02-04 18:35 5992<!DOCTYPE HTML PUBLIC " ... -
动态加载css和java script
2013-01-24 18:53 2688var portalLoader = { dojo : ... -
[web architect] tomcat+nginx单机
2012-12-24 18:39 999location / { ... -
Tomcat管理配置
2011-04-10 00:49 1223<?xml version='1.0' encod ... -
当前浏览器对html5的支持[狠图]
2011-01-15 03:08 4508html5是web的未来,这部巨作尚未完成,现在闪现的还只是一 ... -
richfaces中facelet版本升级到2时的典型错误和解决办法
2010-08-31 10:23 60122010-8-31 9:48:35 com.sun.faces ... -
探讨JSF·RichFaces分页的一种策略
2010-03-22 17:06 2809richfaces提供的rich:dataTable和rich ... -
checkbox与dataTable的完美结合
2010-02-23 17:43 11266本文介绍了richface的一种使用情况:datatable和 ... -
richface 皮肤
2010-01-07 13:36 1510一、绪 richface默认提供 ... -
RichFaces第一例
2009-12-29 14:30 1671学习JSF和RichFaces一周了,总结以一个小例子为介,分 ... -
大小写问题
2008-10-14 16:11 1258背景: 系统包括单点登录模块,存在多个数据库,有mysql和o ... -
九张图
2004-12-02 13:52 1197这些天一直在做查询页面。昨天碰到了这个:美工提供的在页面上显示 ... -
翻页的处理
2004-12-28 10:11 10861 翻页时排序:为了实 ... -
上传file前,判断上传文件的扩展名
2004-12-28 10:20 1648首先我不太确定Js能否扑捉到file的value,于是作了一个 ... -
上传文件前判空
2004-12-28 10:24 1266上传文件时如果下拉列表框或file框为空,会报错。下面就解决这 ... -
根据radio值动态显示file
2005-03-01 17:51 1270<html><head><met ... -
jsp/servlet 乱码解决小方法
2005-03-13 15:13 1339import java.io.UnsupportedEncod ... -
关于unconditional
2005-03-18 23:18 936在active状态调用destroyApp(boolean u ... -
实现转贴功能的store procedure
2005-04-05 11:59 1204数据库结构board表--论坛板块表theme表--论坛主题表 ...
相关推荐
Advanced Installer Architect v13.0 + Crack Advanced Installer Architect v13.0 + Crack
Enterprise Architect是一款强大的软件建模工具,由Sparx Systems公司开发,主要用于企业级的系统分析、设计和开发。"Enterprise Architect 7.5汉化+序列号"的资源显然是为那些希望在中文环境下使用该软件的用户提供...
EnterpriseArchitect7.1中文+序列号+中文教程(part2,共两部分) 包含了EnterpriseArchitect7.1的原版、中文补丁、序列号、中文教程。于大家分享
Enterprise Architect7.1中文+序列号+中文教程(part1,共两部分) 包含了EnterpriseArchitect7.1的原版、中文补丁、序列号、中文教程。于大家分享
Advanced Installer Architect是一款高级的安装程序打包工具,我们有时候可能用nsis用的多,Advanced Installer Architect也是一款打包工具,有兴趣的朋友也可以试试。有了Advanced Installer Architect你就可以创建...
华为HCIP考试学习资料,从官方内部获得的资料。HCIE-Cloud+Service+Solutions+Architect+V2.0+实验手册.pdf
Enterprise+Architect+v7.0.816.7z+注册机.part1
UML软件开发与建模工具(Enterprise Architect)是Sparx Systems 公司的旗舰产品。它覆盖了系统开发的整个周期,除了开发类模型之外,还包括事务进程分析,使用案例需求,动态模型,组件和布局,系统管理,非功能需求...
Angular Architect是一个功能强大的工具,可让您基于json文件创建应用程序的完整支架。 安装 使用软件包管理器来安装angular-architect。 npm install -g angular-architect 用法 从头开始创建新应用 ng new myapp ...
EnterpriseArchitect-v8.0858汉化包+注册破解,欢迎下载使用
Enterprise Architect是一款计算机辅助软件工程(CASE)工具,用于设计和构建软件系统、业务流程建模及更多通用的建模。 EA并不仅仅是一个UML画图工具那么简单,它对整个项目开发过程有着非常好的支持。比较亮点的...
7. **逆向工程与向前工程**:Architect 12支持从现有代码生成模型,也可以从模型生成代码,实现代码与模型的双向同步。 安装Architect 12的过程相对简单。用户可以从提供的"EnterpriseArchitect.12 安装版带注册key...
In addition to basic concepts and administration tasks, Apache Tomcat 7 covers some of the most frequently used advanced features of Tomcat, including security, Apache web server integration, load ...
1、双击Advanced Installer Setup 安装主程序。...3、把Crack里面的破解补丁 Advanced Installer Patch 复制到软件安装目录一键Patch破解。C:\Program Files (x86)\Caphyon\Advanced Installer 15.x.x\bin\x86\ 。...
1. 安装一个Web服务器,例如Apache Tomcat 7.0.42,这是运行和部署应用的基础。 2. 下载并安装Sencha Architect 2.2.2,记得在网上注册ID。如果你使用的是试用版,可以在网上寻找破解方法以继续使用。 进入Sencha ...
Cracking the IT Architect Interview English | 30 Nov. 2016 | ISBN: 1787121690 | 372 Pages | AZW3/MOBI/EPUB/PDF (conv) | 22.09 MB Key Features Learn about Enterprise Architects IT strategy and NFR –...
Enterprise Architect 破解版 Enterprise Architect 破解版 Enterprise Architect 破解版 Enterprise Architect 破解版
rational software architect 8.5.1 EVL Setup part7 官方下载速度巨慢,还需要注册,而且迅雷还没有源 官方原始文件的RSA_8.5.1_EVL_Setup.zip的分卷压缩版。共9个包
EnterpriseArchitect.12.0.1210.CE 注册码 用户手册