SlideShare a Scribd company logo
Tomcat Session Clustering
► 강남 중급 모임
► 17.01.12
Page 2
목록
1. On-Premise 에서 사용하는 방식
2. AWS 에서 사용하는 방식
1. 지원 종류
2. 작업 순서
3. Q&A
Page 3
server.xml (L2 Multicast 이용한 방법)
► <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
► channelSendOptions="6">
►
► <Manager className="org.apache.catalina.ha.session.BackupManager"
► expireSessionsOnShutdown="false"
► notifyListenersOnReplication="true"
► mapSendOptions="6"/>
► <!--
► <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="10.0.1.179"
► port="4000"
► selectorTimeout="100"
► 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"/>
► <Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
► </Channel>
►
► <Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
► filter=".*.gif|.*.js|.*.jpeg|.*.jpg|.*.png|.*.htm|.*.html|.*.css|.*.txt"/>
►
► <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.ClusterSessionListener"/>
► </Cluster>
Page 4
AWS 에서 지원 하는 방법
►DynamoDB
►Memcached
Page 5
► 참조
► http://docs.aws.amazon.com/ko_kr/sdk-for-java/v1/developer-guide/java-dg-tomcat-session-manager.html
► https://aws.amazon.com/ko/blogs/developer/amazon-dynamodb-session-manager-for-apache-tomcat
► 조건
► Tomcat 8.0.x
► http://apache.mirror.cdnetworks.com/tomcat/tomcat-8/v8.0.39/bin/apache-tomcat-8.0.39.tar.gz
► aws-dynamodb-session-tomcat-2.0.4.jar
► https://github.com/aws/aws-dynamodb-session-tomcat/releases
► https://github.com/aws/aws-dynamodb-session-tomcat/releases/download/v2.0.4/aws-dynamodb-session-tomcat-2.0.4.jar
► 순서
► IAM 생성 Tomcat DynamoDB 접속용 계정 생성
► 2대의 EC2 에 Tomcat 8 설치
► aws-dynamodb-session-tomcat-2.0.4.jar 다운로드
► Tomcat 8 context.xml 수정 (다음 페이지)
► Load Balancing (ALB or ELB) 생성 및 설정 추가
► Target Groups 에 stickiness 설정 하기
► DynamoDB 테이블 생성
► Table Name : Tomcat_SessionState
► Primary partition key : sessionId (String)
► Tomcat 8 시작 및 확인
► http://$alb-address/sesstion.jsp 세션 생성
► http://$alb-address/manager 세션 확인
► DynamoDB 세션 확인
► 작업 내역
► https://www.youtube.com/playlist?list=PLzMxB6D1eypLGDDTQj62EQoXz2vQ1xY2S
DynamoDB 이용하는 방법
Page 6
► <Manager
► className="com.amazonaws.services.dynamodb.sessionmanager.DynamoDBSessionManager"
► awsAccessKey=“$IAM_ACCESS_KEY"
► awsSecretKey=" $IAM_SECRET_KEY "
► table=“Tomcat_SessionState"
► regionId="ap-northeast-2"
► createIfNotExist="true" />
/home/ec2-user/apps/tomcat/conf/context.xml
Q&A

More Related Content

PDF
톰캣 #09-쓰레드
PDF
DDoS: Practical Survival Guide
 
TXT
Backup
PPTX
Varnish
KEY
Fluent plugin-dstat
PDF
Nagios Conference 2013 - Sheeri Cabral - Alerting With MySQL and Nagios
PDF
Java Heap Dump Analysis Primer
PDF
Scaling WordPress
톰캣 #09-쓰레드
DDoS: Practical Survival Guide
 
Backup
Varnish
Fluent plugin-dstat
Nagios Conference 2013 - Sheeri Cabral - Alerting With MySQL and Nagios
Java Heap Dump Analysis Primer
Scaling WordPress

What's hot (20)

ODP
PDF
Adopting GraalVM - Scala eXchange London 2018
PDF
tokyo.vcl発表資料(varnish+squid)
PPTX
Ch10.애플리케이션 서버의 병목_발견_방법
PDF
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
PDF
gRPC with Scala and Swift
PPT
Hibernate Cache
PDF
A3 sec -_msr_2.0
PDF
PyGotham 2014 Introduction to Profiling
ODP
Varnish qconsp 2011
PDF
Hatohol technical-brief-20130830-hbstudy
PDF
Cassandra SF 2013 - Cassandra Internals
PDF
Velocity 2011 - Our first DDoS attack
PPT
Find bottleneck and tuning in Java Application
PPT
Heap & thread dump
PDF
Introduction to performance tuning perl web applications
PDF
Redis as a message queue
PDF
Managing MariaDB Server operations with Percona Toolkit
PDF
Tsung info
Adopting GraalVM - Scala eXchange London 2018
tokyo.vcl発表資料(varnish+squid)
Ch10.애플리케이션 서버의 병목_발견_방법
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
gRPC with Scala and Swift
Hibernate Cache
A3 sec -_msr_2.0
PyGotham 2014 Introduction to Profiling
Varnish qconsp 2011
Hatohol technical-brief-20130830-hbstudy
Cassandra SF 2013 - Cassandra Internals
Velocity 2011 - Our first DDoS attack
Find bottleneck and tuning in Java Application
Heap & thread dump
Introduction to performance tuning perl web applications
Redis as a message queue
Managing MariaDB Server operations with Percona Toolkit
Tsung info
Ad

Recently uploaded (20)

PPTX
Essential Infomation Tech presentation.pptx
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
history of c programming in notes for students .pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
top salesforce developer skills in 2025.pdf
PDF
Nekopoi APK 2025 free lastest update
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
AI in Product Development-omnex systems
PDF
Digital Strategies for Manufacturing Companies
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
Essential Infomation Tech presentation.pptx
How Creative Agencies Leverage Project Management Software.pdf
Softaken Excel to vCard Converter Software.pdf
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
history of c programming in notes for students .pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
L1 - Introduction to python Backend.pptx
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Adobe Illustrator 28.6 Crack My Vision of Vector Design
top salesforce developer skills in 2025.pdf
Nekopoi APK 2025 free lastest update
Navsoft: AI-Powered Business Solutions & Custom Software Development
2025 Textile ERP Trends: SAP, Odoo & Oracle
AI in Product Development-omnex systems
Digital Strategies for Manufacturing Companies
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Which alternative to Crystal Reports is best for small or large businesses.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Ad

Tomcat session clustering

  • 1. Tomcat Session Clustering ► 강남 중급 모임 ► 17.01.12
  • 2. Page 2 목록 1. On-Premise 에서 사용하는 방식 2. AWS 에서 사용하는 방식 1. 지원 종류 2. 작업 순서 3. Q&A
  • 3. Page 3 server.xml (L2 Multicast 이용한 방법) ► <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" ► channelSendOptions="6"> ► ► <Manager className="org.apache.catalina.ha.session.BackupManager" ► expireSessionsOnShutdown="false" ► notifyListenersOnReplication="true" ► mapSendOptions="6"/> ► <!-- ► <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="10.0.1.179" ► port="4000" ► selectorTimeout="100" ► 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"/> ► <Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/> ► </Channel> ► ► <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" ► filter=".*.gif|.*.js|.*.jpeg|.*.jpg|.*.png|.*.htm|.*.html|.*.css|.*.txt"/> ► ► <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.ClusterSessionListener"/> ► </Cluster>
  • 4. Page 4 AWS 에서 지원 하는 방법 ►DynamoDB ►Memcached
  • 5. Page 5 ► 참조 ► http://docs.aws.amazon.com/ko_kr/sdk-for-java/v1/developer-guide/java-dg-tomcat-session-manager.html ► https://aws.amazon.com/ko/blogs/developer/amazon-dynamodb-session-manager-for-apache-tomcat ► 조건 ► Tomcat 8.0.x ► http://apache.mirror.cdnetworks.com/tomcat/tomcat-8/v8.0.39/bin/apache-tomcat-8.0.39.tar.gz ► aws-dynamodb-session-tomcat-2.0.4.jar ► https://github.com/aws/aws-dynamodb-session-tomcat/releases ► https://github.com/aws/aws-dynamodb-session-tomcat/releases/download/v2.0.4/aws-dynamodb-session-tomcat-2.0.4.jar ► 순서 ► IAM 생성 Tomcat DynamoDB 접속용 계정 생성 ► 2대의 EC2 에 Tomcat 8 설치 ► aws-dynamodb-session-tomcat-2.0.4.jar 다운로드 ► Tomcat 8 context.xml 수정 (다음 페이지) ► Load Balancing (ALB or ELB) 생성 및 설정 추가 ► Target Groups 에 stickiness 설정 하기 ► DynamoDB 테이블 생성 ► Table Name : Tomcat_SessionState ► Primary partition key : sessionId (String) ► Tomcat 8 시작 및 확인 ► http://$alb-address/sesstion.jsp 세션 생성 ► http://$alb-address/manager 세션 확인 ► DynamoDB 세션 확인 ► 작업 내역 ► https://www.youtube.com/playlist?list=PLzMxB6D1eypLGDDTQj62EQoXz2vQ1xY2S DynamoDB 이용하는 방법
  • 6. Page 6 ► <Manager ► className="com.amazonaws.services.dynamodb.sessionmanager.DynamoDBSessionManager" ► awsAccessKey=“$IAM_ACCESS_KEY" ► awsSecretKey=" $IAM_SECRET_KEY " ► table=“Tomcat_SessionState" ► regionId="ap-northeast-2" ► createIfNotExist="true" /> /home/ec2-user/apps/tomcat/conf/context.xml
  • 7. Q&A