๐Ÿ“—
smiley book
  • Smiley Books
  • AI
    • Readme
    • openai-whisper
      • ์ƒ˜ํ”Œ ์‹คํ–‰ํ•ด๋ณด๊ธฐ
      • GPU ์„œ๋ฒ„ ์ค€๋น„ํ•˜๊ธฐ
      • API๋กœ whisper๋ฅผ ์™ธ๋ถ€์— ์˜คํ”ˆํ•˜๊ธฐ
      • ํ”„๋กฌํ”„ํŠธ ์ง€์›
      • ์‹ค์‹œ๊ฐ„ message chat
      • ํ™”๋ฉด ์ด์˜๊ฒŒ ๋งŒ๋“ค๊ธฐ์™€ ๋กœ๊ทธ์ธ
      • ํŒŒ์ด์ฌ ๊ฐ€์ƒํ™˜๊ฒฝ
      • ์‹ค์‹œ๊ฐ„ voice chat
      • fine tunning(๋ฏธ์„ธ ์กฐ์ •) ์œผ๋กœ ์„ฑ๋Šฅ ์˜ฌ๋ฆฌ๊ธฐ
      • app์—์„œ api๋ฅผ ํ˜ธ์ถœํ•˜์—ฌ ์‹ค์‹œ๊ฐ„์œผ๋กœ ํ…์ŠคํŠธ๋กœ ๋ฐ”๊ฟ”๋ณด๊ธฐ
    • ollama - llm์„ ์‰ฝ๊ฒŒ ๋‚ด์ปด์—์„œ ์‹คํ–‰
      • ollama webui
      • ollama docker
    • stable diffusion
      • SDXL - text to image
      • SD-webui
    • ChatGPT
      • ๋‹ต๋ณ€์ด ๋Š๊ธธ๋•Œ
      • ์—ญํ• ์„ ์ •ํ•˜์ž
      • ๊ตฌ์ฒด์ ์ธ ์งˆ๋ฌธ
      • ๊ฒฐ๊ณผํ˜•ํƒœ๋ฅผ ์ง€์ •
      • ํ”„๋กฌํ”„ํŠธ๋ฅผ ์—ฌ๋Ÿฌ์ค„๋กœ ์‚ฌ์šฉํ•˜์ž.
      • ๋งˆํ‹ด ํŒŒ์šธ๋Ÿฌ ๊ธ€ ๋ฒˆ์—ญ๋ณธ
    • Prompt Engineering
    • Auto-GPT
    • Gemini
      • google ai studio
      • gemini-api
      • embedding guide
    • Huggingface
      • huggingface ์‚ฌ์šฉ๋ฒ•
      • huggingface nlp ๊ณต๋ถ€์ค‘
    • kaggle
      • download dataset
    • langchain
      • langchain์„ ๊ณต๋ถ€ํ•˜๋ฉฐ ์ •๋ฆฌ
      • basic
      • slackbot
      • rag
      • document-loader
      • website-loader
      • confluence
      • memory
      • function-call
      • langsmith
      • agent-toolkit
  • Ansible
    • templates vs files and jinja2
    • dynamic inventory
    • limit ์˜ต์…˜ ๊ฐ•์ œํ•˜๊ธฐ
    • limit ์‚ฌ์šฉํ›„ gather_fact ๋ฌธ์ œ
  • AWS
    • AWS CLI
    • EKS
      • cluster manage
      • ALB Controller
      • external-dns
      • fargate
    • ECR
    • S3
    • Certificate Manager
  • Azure
    • Azure AD OAuth Client Flow
  • Container
    • Registry
    • ๋นŒ๋“œ์‹œ์— env๊ฐ’ ์„ค์ •ํ•˜๊ธฐ
  • DB
    • PXC
      • Operator
      • PMM
      • ์‚ญ์ œ
      • GTID
      • Cross Site Replication
    • Mssql
    • Mysql
  • dotnet
    • Thread Pool
    • Connection Pool
    • Thread Pool2
  • Devops
    • Recommendation
  • GIT
    • Basic
    • Submodule
  • GitHub
    • Repository
    • GitHub Action
    • GitHub PR
    • Self Hosted Runner
    • GitHub Webhook
  • GitLab
    • CI/CD
    • CI/CD Advance
    • Ssl renew
    • CI/CD Pass env to other job
  • Go Lang
    • ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ๊ตฌ์ถ•
    • multi os binary build
    • kubectl๊ฐ™์€ cli๋งŒ๋“ค๊ธฐ
    • azure ad cli
    • embed static file
    • go study
      • pointer
      • module and package
      • string
      • struct
      • goroutine
  • Kubernetes
    • Kubernetes๋Š” ๋ฌด์—‡์ธ๊ฐ€
    • Tools
    • Install with kubespray
    • Kubernetes hardening guidance
    • 11 ways not to get hacked
    • ArgoCD
      • Install
      • CLI
      • Repository
      • Apps
      • AWS ALB ์‚ฌ์šฉ
      • Notification slack
      • Backup / DR
      • Ingress
      • 2021-11-16 Github error
      • Server Config
      • auth0 ์ธ์ฆ ์ถ”๊ฐ€(oauth,OIDC)
    • Extension
      • Longhorn pvc
      • External dns
      • Ingress nginx
      • Cert Manager
      • Kube prometheus
    • Helm
      • Subchart
      • Tip
    • Loki
    • Persistent Volume
    • TIP
      • Job
      • Pod
      • Log
  • KAFKA
    • raft
  • KVM
    • kvm cpu model
  • Linux
    • DNS Bind9
      • Cert-Manager
      • Certbot
      • Dynamic Update
      • Log
    • Export and variable
    • Grep ์‚ฌ์šฉ๋ฒ•
  • Modeling
    • C4 model introduce
    • Mermaid
    • reference
  • Monitoring
    • Readme
    • 0. What is Monitoring
    • 1. install prometheus and grafana
    • 2. grafana provisioning
    • 3. grafana dashboard
    • 4. grafana portable dashboard
    • 5. prometheus ui
    • 6. prometheus oauth2
    • Prometheus
      • Metric type
      • basic
      • rate vs irate
      • k8s-prometheus
    • Grafana
      • Expolorer
    • Node Exporter
      • advance
      • textfile collector
  • Motivation
    • 3 Simple Rule
  • OPENNEBULA
    • Install(ansible)
    • Install
    • Tip
    • Windows vm
  • Reading
    • comfort zone
    • ๋ฐฐ๋ ค
    • elon musk 6 rule for insane productivity
    • Feynman Technique
    • how to interview - elon musk
    • ๊ฒฝ์ฒญ
    • Readme
  • Redis
    • Install
    • Master-slave Architecture
    • Sentinel
    • Redis Cluster
    • Client programming c#
  • SEO
    • Readme
  • Security
    • criminalip.io
      • criminalip.io
  • Stock
    • robinhood-python
  • Terraform
    • moved block
    • output
  • vault
    • Readme
  • VS Code
    • dev container
    • dev container on remote server
  • Old fashione trend
    • curity
    • MAAS
      • Install maas
      • Manage maas
      • Tip
Powered by GitBook
On this page
  • ์ฃผ์˜
  • ๊ณ ๋ ค์‚ฌํ•ญ
  • source cluster ๊ตฌ์„ฑ
  • replica cluster
  • ์ถ”๊ฐ€

Was this helpful?

  1. DB
  2. PXC

Cross Site Replication

PreviousGTIDNextMssql

Last updated 1 year ago

Was this helpful?

๋‘๊ฐœ์˜ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค์—์„œ ๋””๋น„๋ฅผ ๋ฆฌํ”Œ๋ฆฌ์ผ€์ด์…˜ ํ• ์ˆ˜ ์žˆ๋‹ค.

์ฃผ์˜

  • Percona XtraDB Cluster 8.0.22+ ์ด์ƒ์„ ์„ค์น˜ํ•ด์•ผ ํ•œ๋‹ค.

  • haproxy๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์ž˜๋˜๋Š”๋ฐ proxy sql์„ ์‚ฌ์šฉํ•˜๋ฉด ์•ˆ๋œ๋‹ค.

  • ๋ณต์ œ์‹œ ์‚ฌ์šฉํ•  ๋น„๋ฒˆ์ด ๊ฐ™์•„์•ผํ•œ๋‹ค. secret.yml์— ๊ฐ™์€ ๋น„๋ฒˆ์œผ๋กœ ์„ค์ •ํ•ด์ฃผ๋ฉด ๋œ๋‹ค.

๊ณ ๋ ค์‚ฌํ•ญ

  • pitr์„ replica ํด๋Ÿฌ์Šคํ„ฐ์—์„œ ํ• ๊ฒƒ์ธ๊ฐ€?

  • ๋ฐฑ์—…์€ ์–ด๋А ํด๋Ÿฌ์Šคํ„ฐ์—์„œ ํ• ๊ฒƒ์ธ๊ฐ€?

source cluster์—์„œ ํ•˜๋Š”๊ฒƒ์œผ๋กœ ๊ฒฐ์ • ์™œ๋ƒ๋ฉด ๋งˆ์Šคํ„ฐ๊ฐ€ ์•„๋ฌด๋ž˜๋„ ์ตœ์‹ ์ด๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

์ „์ฒด ๋ฐฑ์—…์€ source cluster์—์„œ ํ•˜๋ฏ€๋กœ ๋ฆฌํ”Œ๋ฆฌ์นด์—์„œ๋Š” ์•ˆํ•˜๋Š”๊ฒƒ์œผ๋กœํ•œ๋‹ค.

source cluster ๊ตฌ์„ฑ

cr.yaml
spec:
  pxc:
    expose:
      enabled: true
      type: LoadBalancer
    replicationChannels:
      - name: pxc1_to_pxc2
        isSource: true

์ฒด๋„์„ ์„ค์ •ํ•˜๊ณ  isSource๋ฅผ true๋กœ ์„ค์ •ํ•œ๋‹ค.

load balance๋ฅผ ์ด์šฉํ•˜์—ฌ svc๋ฅผ ํ†ตํ•ด ์™ธ๋ถ€์— ์˜คํ”ˆํ•œ๋‹ค.

kubectl get services -l "app.kubernetes.io/instance=CLUSTER_NAME" ์„œ๋น„์Šค๋ฅผ ํ™•์ธํ•˜์ž. ์•„์ดํ”ผ๋ฅผ ํ™•์ธํ•˜์ž.

replica cluster

๋ณต์ œ๋ฅผ ๋ฐ›์„ ํด๋Ÿฌ์Šคํ„ฐ์—์„œ ์„ค์ •ํ•˜์ž.

์œ„์—์„œ ๋กœ๋“œ๋ฐœ๋ž€์Šค๋กœ ์˜คํ”ˆํ•œ ์•„์ดํ”ผ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

cr.yaml
pxc:
  replicationChannels:
    - name: pxc1_to_pxc2
    isSource: false
    sourcesList:
    - host: 172.16.3.155
      port: 3306
      weight: 40
    - host: 172.16.3.156
      port: 3306
      weight: 30
    - host: 172.16.3.158
      port: 3306
      weight: 30

์„ค์ • ์ถ”๊ฐ€ํ•˜๊ณ  ์ ์šฉํ•˜๋ฉด ํด๋Ÿฌ์Šคํ„ฐ๊ฐ€ ๋œจ๋ฉด์„œ ๋ณต์ œ๋ฅผ ์‹œ์ž‘ํ•œ๋‹ค.

์ƒˆ๋กœ ์˜ฌ๋ผ์˜จ ๋””๋น„๋ฅผ ํ™•์ธํ•ด๋ณด๋ฉด ๋ณต์ œ๊ฐ€ ๋˜๋Š”๊ฒƒ์„ ์•Œ์ˆ˜ ์žˆ๋‹ค.

์ถ”๊ฐ€

์ด์ œ source cluster๊ฐ€ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒจ์„œ ์ง€์›Œ์ง€๋ฉด replica cluster๋ฅผ ๊ธฐ๋ณธ์œผ๋กœ ๋Œ๋ ค์•ผํ• ๊ฑด๋ฐ ์–ด๋–ป๊ฒŒ ํ•˜์ง€?

https://www.percona.com/doc/kubernetes-operator-for-pxc/replication.html