Session Cache Server and the Tomcat cluster architecture concept

2010-09-08  来源:本站原创  分类:Java  人气:184 

Session Cache Server and the Tomcat cluster architecture concept

Or see my blog CSDN

http://blog.csdn.net/myloon/archive/2010/09/06/5866456.aspx

1. Sessin Cache Server (Session cache server) [SCS]
Features:
1) a single SCS: SCS data in the Session cache, multiple application servers share the SCS in the Session; each time a new Session Session or new data update, in addition to the normal cache, also cache has changed the Session ID and data Key to inform the SCS or other perceived synchronization data; through the LRU algorithm, do not use the Session for persistence (files, databases, etc.).

Session Cache Server and the Tomcat cluster architecture concept

Analysis:
Solve a number of AppServer Session sharing between, Session data can be stored in the SCS on the concentration.
With the increase of Application Server, SCS pressure rising, the number of stored Session will become huge, not enough memory.
Traffic is not suitable for large Web sites.

2) Configure multiple SCS: SCS only synchronization between the new and changing data, all SCS data in the same Session; SCS is equality between one of SCS with data synchronization, the synchronization data to all SCS.

Session Cache Server and the Tomcat cluster architecture concept

Analysis: only a single physical expansion of SCS. As users increase, Application Server also increases, although the pressure can be reduced by increasing the SCS, but the number of stored Session will become huge, not enough memory, and the need for synchronization of data becomes enormous, affecting network traffic, all SCS bit of a waste to maintain a copy of the same Session, Session such a case similar to the JavaEE server copy of the state.

3) SCS group: the formation of one or more SCS SCS group, the group can be expanded according to demand any number (N), SCS; group SCS slice storage Session, SCS group independent of each other, each group maintaining different SCS The Session, improve performance and memory utilization; SCS group standby (or plane mirror) mode, providing Failover, do HA; Session client configuration group all the SCS, through the algorithms are stored on different servers Session, improve performance, avoid the waste of maintaining Session; SCS group standby (or mirror) Session data between the synchronization (sync only new and changed data); combination of AppServer and load equalizer clusters can improve cluster performance.
 SCS group data partitioning based on the idea to improve cluster performance, SCS group through the mirror to achieve high availability and improve cluster performance.
 slice storage extension can be saved Session, but also save the object data.
 Key for the same Session, and the same corresponding SCS Num is stable.
 slice storage algorithm:
(See MemCached distributed algorithm http://zhengdl126.javaeye.com/blog/420521)
 A to request the dispersion (or to request the Hash):
This algorithm is about Key's hash value divided by the number of SCS SCS group received more than a few, but decided to tell the Cache data storage where a SCS on, still have key = 1, value = user1 and key = 2, value = user2 two data as an example:
For key = 1, hash value% SCS number = (1% 2) = 1, store SCS 2 on;
For key = 2, hash value% SCS number = (2% 2) = 0, stored on the SCS 1.
Obviously this way, Cache data will be distributed in different SCS on the  Consistent Hashing

Session Cache Server and the Tomcat cluster architecture concept

Details see Annex

相关文章
  • Session Cache Server and the Tomcat cluster architecture concept 2010-09-08

    Session Cache Server and the Tomcat cluster architecture concept Or see my blog CSDN http://blog.csdn.net/myloon/archive/2010/09/06/5866456.aspx 1. Sessin Cache Server (Session cache server) [SCS] Features: 1) a single SCS: SCS data in the Session ca

  • [Change] nginx + tomcat cluster load balancing (to achieve session replication) 2010-09-19

    Keywords: Nginx, Tomcat, clustering, load balancing Transfer from: http://blog.chinaunix.net/u2/83793/showart_1354266.html Architecture Description Nginx front-end server to do a load balancer, back up the cluster composed of N sets tomcat processing

  • nginx + tomcat cluster load balancing (to achieve session replication) 2010-12-11

    Nginx + tomcat load balancing done Architecture Description Nginx front-end server to do a load balancer, put back the cluster composed of N units tomcat processing services, nginx forwarded through to the back (Note: did not do static and dynamic se

  • tomcat cluster and On-line session, when the number of statistical 2009-07-29

    tomcat cluster, the original implementation class through the HttpSessionListener listen to session creation and destruction statistics online method is no longer valid, because not everyone will be landing in the same tomcat server, tomcat in anothe

  • Liunx building under apache + tomcat cluster 1 2010-05-22

    Test server bbs I am using the tomcat running, the last two days playing with apache + tomcat cluster, so ready to use apache + tomcat cluster re-deploy applications under my bbs on it when the theory with practice, using this architecture program I

  • TOMCAT cluster configuration 2010-03-29

    TOMCAT cluster configuration My operating environment: Windows2003 Server SP4 + J2SDK1.5.0 + Tomcat5.5.9 Preparation software Tomcat 5.5.9 JDK1.5.0 1. Configuration 1, install JDK1.5.0. Use the default installation can be. 2, install tomcat into the

  • Apache + Tomcat cluster configuration Xiang Jie (2) 2010-03-28

    Apache + Tomcat cluster configuration Xiang Jie (2) 4, Tomcat configuration If only available to configure a cluster, Tomcat configuration will be very simple. Open the t1 and t2 respectively, the server.xml configuration file, for t1, the default se

  • Liunx building under apache + tomcat cluster 2 2010-05-22

    First Division Tomcat 1 <Connector port = "9087" protocol = "HTTP/1.1" connectionTimeout = "20000" redirectPort = "8443" /> Tomcat 2 <Connector port = "9088 protocol =" HTTP/1.1 " connectionT

  • apache + tomcat cluster load build process 2010-08-25

    apache tomcat server and the connection are in fact three: JK, http_proxy and ajp_proxy. This paper describes the most common JK. Environment: PC2 Taiwan: pc1 (IP 192.168.1.179) installed apache and tomcat3 pc2 (IP 192.168.1.175) installed tomcat1 pc

  • Detailed Apache + Tomcat cluster configuration (2) 2010-10-26

    Fourth, Tomcat configuration If only for an available cluster configuration, Tomcat configuration will be very simple. T1 and t2, respectively, to open the server.xml configuration file, for t1, the default settings as far as possible, and make major

  • [Google paper I] for the planet Web search: google cluster architecture 2010-12-17

    Reprinted please specify: http://duanple.blog.163.com/blog/static/70971767201091102339246/ of phylips @ bmy In order to support scalable parallel, google's web search application to different queries handled by different processors, while the global

  • linux apache tomcat cluster integration with apache and tomcat 2011-05-27

    linux apache tomcat with apache and tomcat cluster integration (only 80 ended with a different port number to access the application under tomcat) Environment: Two linu, ip, respectively, 192.168.88.29 (installing apache, two tomcat, jdk, jk) (two to

  • Tomcat cluster analysis Cluster implementation principle 2011-02-14

    In my previous blog (http://zyycaesar.iteye.com/admin/blogs/295227) briefly describes how to implement a simple tomcat cluster configuration, this article is intended to introduce the tomcat cluster configuration of more in-depth detail to meet speci

  • Apache + Tomcat cluster configuration in detail 2011-02-14

    First, the software is ready Apache 2.2: http://httpd.apache.org/download.cgi , download msi installer, select no ssl version Tomcat 6.0: http://tomcat.apache.org/download-60.cgi , download Tomcat 6.0.18 zip file Note: Due to Apache and Tomcat projec

  • centos environment and load balancing apache tomcat cluster configuration notes 2011-06-23

    System Environment: centos4.8 Application Version: apache: 2.2.3 tomcat: 7.0.14 Configuration points: 1.tomcat session replication: server.xml, add a node in <Engine>: <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" cha

  • Apache+Tomcat cluster 实践 2014-07-16

    近来我们的程序部署给客户,不过有些客户提出了更高的性能,以及更好的利用客户的硬件资源的要求. 我们的程序很简单, Java写的基于spring框架的webservice,部署在tomcat7上. 程序后台可以访问数据库,程序也有逻辑来维护额外的session信息,所以我想尝试下session可用度. Cluster配置还是比较简单的,我基于如下文章和官方帮助. 简单说有3块, 1. 配置Apache的load balance, 可以试用mod_jk或mod_proxy, 我还没有试验过nginx

  • Apache + Tomcat cluster configuration Xiang Jie (1) 2010-03-28

    First, the software ready Apache 2.2: http://httpd.apache.org/download.cgi, download the msi installer, select the no ssl version Tomcat 6.0: http://tomcat.apache.org/download-60.cgi, download the Tomcat 6.0.18 zip file Note: Due to Apache and Tomcat

  • Liunx building under nginx + tomcat cluster 2010-05-22

    nginx apache installation to install than the more simple, I mainly refer to the following installed on this article http://www.jsprun.net/thread-16889-1-1.html I guarantee when installed apache + tomcat2 two tomcat cluster fixed, it apcache stopped

  • Liunx nginx + tomcat cluster under construction 2010-05-22

    nginx apache installation to install than the more simple, I mainly refer to the following installed on this article http://www.jsprun.net/thread-16889-1-1.html I guarantee when installed apache + tomcat2 two tomcat cluster fixed, it apcache stopped

  • Nginx Tomcat cluster deployment configuration (Nginx default forwarding method) 2010-06-23

    Configure Nginx server @ Author estone 1.Nginx configuration file contents server ip: your.own.server.ip config file path: / usr / local / webserver / nginx / conf / nginx.conf --------------[S]---nginx config file content---[S]--------------- user w