티스토리 뷰

1. 수정할 환경파일들

  참고

  " 기존에 jeus스크립트 설정에서 vhost.properties 설정으로 변경되었다. 또한, vhost.xml에서 vhost.properties로 명칭도 변경되었다. "

 

  - vhost.properties

  - JEUSMain.xml

  - WEBMain.xml 

 

2. 환경설정

 

  1) vhost.properties

    - 위치 : $JEUS_HOME/config/vhost.properties

    - 이 스크립트 파일에 설정을 해주어야 Manager단에서 세션서버를 찾을 수 있다.

    - 설정내용

    

    WAS1 (111.111.111.1)

        was1:111.111.111.1:9736

        was2:111.111.111.2:9736

    WAS2 (111.111.111.2)            

        was1:111.111.111.1:9736

        was2:111.111.111.2:9736

    - 앞부분에 was1, was2 는 JEUS의 Node명으로 "$JEUS_HOME/config/Node명", JEUSMain.xml의 <node>Node명</node>과 일치하여야 한다. 일종의 논리적이름이라고 보면 된다.

    - 뒷부분에 111.111.111.1:9736 설정은 물리적인 정보이다. /etc/hosts 와도 관계가 있으니, 설정시 주의하여 작업하여야 한다.

 

 

 

2) JEUSMain.xml

    - 위치 : $JEUS_HOME/config/`hostname`/JEUSMain.xml

    - <node> 안에 <session-server> 태그를 시작으로 세션서버를 구성한다.

    - JEUS 5.x와의 차이점 : <commnad-option> 에 설정부분이 사라졌다.

    - <replicated-server>은 백업으로 지정할 session server명 인데,이 설정한 항목은 vhost.properties에 설정한 항목과 일치하여야 함.

    - 설정내용

    WAS1 (111.111.111.1)

<node>
    ...
    <engine-container>
        ...
    </engine-container>
    <session-server>
         <type>primary</type>
<!--
        <thread-pool>
            <min>10</min>
            <max>20</max>
        </thread-pool>
-->
        <resolution>30000</resolution>
        <connect-timeout>60000</connect-timeout>
        <read-timeout>60000</read-timeout>
        <passivation-to>-1</passivation-to>
        <removal-to>2100000</removal-to>
        <check-to>20000</check-to>
        <backup-trigger>500</backup-trigger>
        <check-level>set</check-level>
<!--
        <file-db-path>c:\sessiondata</file-db-path>
        <file-db-name>sessiondata</file-db-name>
        <min-hole>2000</min-hole>
        <packing-rate>0.8</packing-rate>
-->
        <recovery-mode>active</recovery-mode>
        <replicated-server>was2</replicated-server> 
    </session-server>
</node>


    WAS2 (111.111.111.2)

<node>
    ...
    <engine-container>
        ...
    </engine-container>
    <session-server>
         <type>backup</type>
<!--
        <thread-pool>
            <min>10</min>
            <max>20</max>
        </thread-pool>
-->
        <resolution>30000</resolution>
        <connect-timeout>60000</connect-timeout>
        <read-timeout>60000</read-timeout>
        <passivation-to>-1</passivation-to>
        <removal-to>2100000</removal-to>
        <check-to>20000</check-to>
        <backup-trigger>500</backup-trigger>
        <check-level>set</check-level>
<!--
        <file-db-path>c:\sessiondata</file-db-path>
        <file-db-name>sessiondata</file-db-name>
        <min-hole>2000</min-hole>
        <packing-rate>0.8</packing-rate>
-->
        <recovery-mode>active</recovery-mode>
        <replicated-server>was1</replicated-server>
    </session-server>
</node>

 

 

 

 

  3) WEBMain.xml

    - 위치 : $JEUS_HOME/config/`hostname`/`hostname`_container1/WEBMain.xml

    - WebContainer에서 primary와 backup으로 지정할 세션서버명을 설정한다.

    참고

    - Node 클러스터링이 아닌 세션 클러스터링일 경우 반드시, <session-config><distributable> 설정을 true로 하여야 한다.

    - 실수로 자주 빠트리는 부분이므로 반드시 체크하기 바란다.

    

    - 설정내용

    WAS1 (111.111.111.1)

<web-container>
    <context-group>
    ...
    </context-group>
     
    <session-config>
        <distributable>true</distributable>
        <shared>true</shared>
        <timeout>30</timeout>
        <reload-persistent>true</reload-persistent>
    </session-config>
     
    <session-server>
        <primary-server>was1</primary-server>
        <backup-server>was2</backup-server>
        <connection-timeout>60000</connection-timeout>
        <read-timeout>60000</read-timeout>
        <check-level>set</check-level>
    </session-server>
</web-container>

    

    WAS2 (111.111.111.2)

<web-container>
    <context-group>
    ...
    </context-group>
     
    <session-config>
        <distributable>true</distributable>
        <shared>true</shared>
        <timeout>30</timeout>
        <reload-persistent>true</reload-persistent>
    </session-config>
     
    <session-server>
        <primary-server>was1</primary-server>
        <backup-server>was2</backup-server>
        <connection-timeout>60000</connection-timeout>
        <read-timeout>60000</read-timeout>
        <check-level>set</check-level>
    </session-server>
</web-container>

 

 

3. 옵션 설명

 

JEUSMain.xml

    <type>

    - 세션서버타입. primary/backup 둘중 하나 선택. 

    - JEUS노드 클러스터링 환경이 아니라면 무의미함.


    <connect-timeout>

    default : 5000 ms

    - 중앙집중식 세션서버들 간의 socket connection을 생성할 때 적용되는 timeout값.

    - 해당 세션서버가 주 세션서버라면 웹 컨테이너에서도 이 값을 connection timeout으로 사용한다.

    

    <read-timeout>

    default : 20000 ms

    - 중앙집중식 세션서버들 간의 read connection을 생성할 때 적용되는 timeout값. 

    - 데이터를 보낸 후 응답을 최대 이 시간만큼 기다리게 된다. 

    - 해당 세션서버가 주 세션서버라면 웹 컨테이너에서도 이 값을 read timeout으로 사용한다.

    

    <resolution>

    default : 60000 ms

    <removal-to>,<passivation-to> 등의 operation을 수행하는 thread의 활동 주기.

    

    <passivation-to>

    default : -1

    - memory에 존재하는 session객체를 일정시간 사용하지 않으면 삭제하고 대신 file-db에 저장된 객체를 사용하게 하는 설정이다.

    -1일경우, passivation을 수행하지 않음. 

    - 즉, file-db를 사용하지 않고 메모리로만 관리함.

    

    <removal-to>

    default : -1

    <passivation-to>가 -1일 경우

      - 메모리에 존재하는 session객체를 지정된 주기에 제거함. 

    <passivation-to>가 -1이 아닐 경우

      - file-db에 저장된 session 객체의 보존 기간을 지정한다. 

    

    <check-to>

    default : 30000 ms

    - Primary와 Backup 세션서버의 체크 주기. 

    - 이 지정한 시간이 되면 Backup 서버로 Copy진행.

    - 이 설정에 지정된 시간 주기로 update된 session 객체가 있는지를 조사하고 update된 session 객체가 존재하면 backup을 수행한다.

    

    <backup-trigger>

    default : 1000 ms

    - local session manager에서 session객체의 update가 지정한 수정도 발생하였을 때 backup session server로 update된 session객체를 backup한다.

    

    <check-level>

    default: set

    - JEUS 노드 클러스터링 환경에서만 의미있음.

    - 웹 컨테이너의 세션객체의 수정이 어느 정도 발생하였을 때 중앙식 세션서버로 세션을 업데이트 할지를 결정함.

    - 주 세션서버에서만 이설정값이 유효하며 백업 세션서버의 경우 설정할 필요 없다.

     

    all : 세션 객체의 수정과 관계없이 항상 세션 서버로 업데이트함.

    modified : 세션 객체의 수정사항을 검사하여 변경시 세션서버로 업데이트함.

    set : 해당 세션의 setAttribute/putValue/removeAttribute/removeValue 함수 호출이 일어난 경우에만 세션서버로 업데이트함.

    

    <recovery-mode>

    default : active

    - 세션 서버가 내려갔다가 다시 살아났을 때 다른 살아있는 세션 서버로부터 세션을 복구하는 모드 설정.

    - 설정 값 :

      active : 다른 살아있는 세션 서버로부터 메모리에 있는 세션들만 복구한다.

      all : 다른 살아있는 세션 서버로부터 파일저장소 및 메모리에 있는 세션들 모두를 복구한다.

      none : 세션 복구를 하지 않는다.

 

WEBMain.xml

    <connection-timeout> 

    - 세션서버로 부터 커넥션을 얻어오는 타임아웃 설정

    - 세션 서버로 새로운 연결이 맺어질 때까지 기다려야 하는 시간 값(풀 크기가 증가 할 때)이다.

    

    <read timeout>

    - 세션서버로 부터 데이터를 읽어오는 타임아웃 설정

    - 값은 세션 서버로부터 데이터 읽기를 시도할 때 기다려야 하는 시간 값이다.



댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함