본문 바로가기
MySQL HA & DR/Group Replication

6. Group Replication System Variables

by 모모레 2017. 3. 23.

여기에서는 Group Replication 플러그인을 사용하는데 필요한 시스템 변수들에 대해 설명한다. Group Replication을 위한 시스템 변수들은 접두사로 group_replication을 사용한다. 


여기에서 설명되는 대부분의 시스템 변수들은 동적으로 설정하는것이 가능하지만, 실제 적용되는 것은 플러그인을 재시작 해야 지만 가능하다. 플러그인을 재시작하지 않고 설정하여 바로 적용되는 시스템 변수들은 따로 언급할 것이다.  


System Variables Name 

 group_replication_group_name

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-group-name=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 String Type 

Group 이름은 해당 서버가 속한 그룹의 이름이어야 하고, 유효한 UUID이어야 한다. 




System Variables Name 

 group_replication_start_on_boot

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-start-on-boot=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 boolean Type 기본값은 ON

서버 시작할 때 Group Replication을 시작해야 하는지 아닌지를 설정하는 변수이다. 



System Variables Name 

 group_replication_local_address

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-local-address=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 String Type 

로컬 주소는 host:port 형태의 문자열로 지정한다. 



System Variables Name 

 group_replication_group_seeds

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-group-seeds=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 String Type 

host1:port1,host2:port2와 같이 쉼표로 연결된 peer 주소의 목록이다. Group Replication을 시작할 때, 각 주소의 유효성을 검사하고, 목록에 하나 이상의 유효한 주소가 있어야 한다. 잘못된 주소가 있다면 START GROUP_REPLICATION 구문 실행 시 실패될 수 있다. 



System Variables Name 

 group_replication_force_members

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-force-members=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 String Type 

host1:port1,host2:port2와 같이 쉼표로 연결된 peer 주소의 목록이다. 이 옵션은 제외된 구성원이 새로운 View를 받지 않고, 차단된 것으로 강제 적용하는데 사용된다. 제외된 서버는 수동으로 종료해야 한다. 목록에 잘못된 호스트 정보가 있으면 그룹 구성원을 차단할 수 있으므로 후속 START GROUP_REPLICATION 구문 실행 시 실패할 수 있다. 



System Variables Name 

 group_replication_bootstrap_group

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-bootstrap-group=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Boolean Type, Default : OFF

bootstrap 하는 그룹의 서버를 설정한다. 이 옵션은 한 서버에서만 설정해야 하며, 처음으로 그룹을 시작하거나, 전체 그룹을 다시 시작할 때에만 설정해야 한다. 그룹이 bootstrap으로 뜬 이후에는 값을 OFF로 변경해야 한다. 파일도 수정해야 하고, 설정 정보도 수정해 놓아야 한다. 그룹이 실행되는 동안 옵션이 설정된 상태에서 두 개의 서버를 시작하거나 하나의 서버를 다시 시작하면 인위적으로 split-brain 상황이 발생할 수도 있다. 



System Variables Name 

 group_replication_poll_spin_loops

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-poll-spin-loops=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Integer Type Default : 0 

Group Communication 스레드가 Communication engine 뮤텍스가 해제될때까지  기다리는 횟수 



System Variables Name 

 group_replication_recovery_retry_count

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-recovery-retry-count=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Integer Type Default:10

Joiner가 Donor와 연결하기 위해 시도하는 횟수 



System Variables Name 

 group_replication_recovery_reconnect_interval

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-recovery-reconnect-interval=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Integer Type Default:60

그룹내에서 연결할 Donor가 없는 경우 다시 재시도 하기까지 기다리는 시간(초) 



System Variables Name 

 group_replication_recovery_use_ssl 

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-recovery-use-ssl

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Boolean Type, Default: OFF

Group Replication Recovery connection을 SSL로 연결할지 말지 설정한다. 



System Variables Name 

 group_replication_recovery_ssl_ca

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-recovery-ssl-ca=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 String Type 

신뢰할 수 있는 SSL 인증 기관 목록이 들어있는 파일의 경로 



System Variables Name 

 group_replication_recovery_ssl_capath 

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-recovery-ssl-capath=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 String Type 

신뢰할 수 있는 SSL 인증 기관 인증서가 있는 디렉토리의 경로 



System Variables Name 

 group_replication_recovery_ssl_cert

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-recovery-ssl-cert=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 String Type 

보안 연결을 설정하는데 사용할 SSL 인증서 파일의 이름 



System Variables Name 

 group_replication_recovery_ssl_key

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-recovery-ssl-key=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 String Type 

보안 연결 설정에 사용할 SSL 키 파일의 이름. 



System Variables Name 

 group_replication_recovery_ssl_cipher

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-recovery-ssl-cipher=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 String Type 

SSL 암호화에 사용할 수 있는 암호의 목록 



System Variables Name 

 group_replication_recovery_ssl_crl

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-recovery-ssl-crl=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 String Type 

인증서 해지 목록이 포함된 파일이 들어있는 디렉토리의 경로 ?



System Variables Name 

 group_replication_recovery_ssl_crlpath

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-recovery-ssl-crlpath=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 String Type 

인증서 해지 목록이 포함된 파일이 들어있는 디렉토리의 경로 ?



System Variables Name 

 group_replication_recovery_ssl_verify_server_cert

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-recovery-ssl-verify-server-cert=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Boolean Type, Default: OFF

복구 프로세스가 Donor가 보낸 인증서에서 서버의 common Name 값을 확인하게 할지 말지를 결정한다. 



System Variables Name 

 group_replication_recovery_complete_at

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-recovery-complete-at=value 

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 enum Type(TRANSACTION_APPLIED, TRANSACTION_CERTIFIED), Default : TRANSACTION_APPLIED

state tranfer 이후에 캐쉬된 트랜잭션을 어떻게 처리할 것인지 복구 정책을 선택하는 옵션이다. 그룹에 가입되어 ONLINE 상태가 되기 전에 모든 트랜잭션을 수신하거나, 아니면 모두 적용한 후 ONLINE으로 표시하거나 둘중의 하나를 선택할 수 있다. 



System Variables Name 

 group_replication_components_stop_timeout

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-components-stop-timeout=value 

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Integer Type, Default: 31536000 

종료할 때 그룹 복제가 각 구성 요소를 기다리는 시간(초)



System Variables Name 

 group_replication_allow_local_lower_version_join

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-allow-local-lower-version-join=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 boolean Type, Default : OFF 

그룹보다 플러그인 버젼이 낮은 경우에도 현재 서버가 그룹에 참여할 수 있는지 여부 



System Variables Name 

 group_replication_allow_local_disjoint_gtids_join

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-allow-local-disjoint-gtids-join=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 boolean Type, Default : OFF 

그룹에 없는 트랜잭션이 있어도 현재 서버가 그룹에 참여하도록 허용할지 여부, 이 옵션은 잘못 사용할 경우 데이터 불일치가 발생할 수 있으므로 주의해야 한다. 



System Variables Name 

 group_replication_auto_increment_increment

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-auto-increment-increment

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Integer Type, Default : 7 

이 서버 인스턴스에서 실행되는 트랜잭션의 연속 열 값 사이의 간격을 결정한다. 



System Variables Name 

 group_replication_compression_threshold

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-compression-threshold=value 

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Integer Type Default : 1000000 

LZ4 압축이 적용되는 바이트 단위의 값이다. 0으로 설정하면 압축을 비활성화 한다. 



System Variables Name 

 group_replication_gtid_assignment_block_size

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-gtid-assignment-block-size=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Integer Type Default: 1000000

각 회원에 대해 예약된 연속 GTID 수이다. 각 멤버는 필요할 때마다 블록을 소비하고 예약하여 사용한다. 



System Variables Name 

 group_replication_ssl_mode

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-ssl-mode=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Enum Type (DISABLE, REQUIRED, VERIFY_CA, VERIFY_IDENTITY), Default : DISABLE 

그룹 복제 구성원 간의 연결 보안 상태를 지정한다. 



System Variables Name 

 group_replication_single_primary_mode

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-single-primary-mode=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Boolean Type, Default : ON

읽기/쓰기 작업 부하를 처리하는 서버 하나를 자동으로 선택하도록 그룹에 지시한다. 이 옵션이 활성화된 서버는 Primary 서버이고, 나머지 서버들은 Secondary 서버가 된다. 



System Variables Name 

 group_replication_enforce_update_everywhere_checks

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-enforce-update-everywhere-checks=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Boolean Type, Default: OFF 

여러 마스터 서버의 업데이트에 대한 엄격한 일관성 검사를 모든 위치에서 사용 또는 사용하지 않도록 설정한다. 



System Variables Name 

 group_replication_flow_control_mode

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-flow-control-mode=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Enum Type(QUOTA, DISABLED) Default: QUOTA

흐름제어에 사용되는 모드를 지정한다. 이 변수는 Group Replication을 재 설정하지 않고 변경할 수 있다. 



System Variables Name 

 group_replication_flow_control_certifier_threshold

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-flow-control-certifier-threshold=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Integer Type, Default: 25000

흐름제어를 트리거하는 certifier 대기열에서 대기중인 트랜잭션의 수를 지정한다. 이 변수는 Group replication을 재설정하지 않고 변경할 수 있다. 




System Variables Name 

 group_replication_flow_control_applier_threshold

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-flow-control-applier-threshold=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 Integer Type, Default: 25000

흐름제어를 트리거하는 applier 대기열에서 대기중인 트랜잭션의 수를 지정한다. 이 변수는 Group replication을 재설정하지 않고 변경할 수 있다. 



System Variables Name 

 group_replication_ip_whitelist

 Introduced

 5.7.17

 Command-Line Format

 --group-replication-ip-whitelist=value

 System Variable 

 Scope : Global 

Dynamic Variable : Yes

 Permitted Values 

 String Type, Default:AUTOMATIC

그룹에 연결할 수 있는 호스트를 지정한다. 기본적으로 AUTOMATIC 으로 설정되어 호스트에서 활성화된 개인 서브 네트워크의 연결을 허용한다. 호스트의 활성 인터페이스가 스캔되고, 사설 서브 네트워크의 주소가 있는 인터페이스가 자동으로 허용목록에 추가된다. 또는 쉼표로 구분된 IPv4 주소 또는 서브넷 CIDR 표기법을 사용하여 허용된 호스트를 지정할 수 있다. ( 192.168.1.0/24, 10.0.0.1)

주소 127.0.0.1은 group_replication_ip_whitelist를 사용하여 지정하지 않은 경우에도 항상 연결이 허용된다. 



'MySQL HA & DR > Group Replication' 카테고리의 다른 글

9.1 Group Replication Plugin Architecture  (0) 2017.03.28
7. Requirements and Limitations  (0) 2017.03.28
5. Group Replication Security  (0) 2017.03.21
4. Group Replication Operations  (0) 2017.03.15
3. Monitoring Group Replication  (0) 2017.03.13