LLM WikiAccess-protected knowledge portal

WIKI

Distribution DB — Instance Separation & Index Optimization

AI Summary Purpose Capture durable knowledge about the Distribution DB DIST DB , its instance separation work, and the index cleanup/optimization performed to keep binlog shipping to customer on premise servers healthy. Key points DIST DB i

경로ai/wiki/projects/distribution-db.md
카테고리Project
태그#binlog #data-pipeline #distribution #infra #kubernetes #monitoring #mysql #project #projects #wiki

# Distribution DB — Instance Separation & Index Optimization

AI Summary

Purpose:

separation work, and the index cleanup/optimization performed to keep binlog shipping to customer on-premise servers healthy.

Key points:

Topology: dist-m (master), dist-r#IDC and dist-r#IN-HOUSE (replicas).

flowing to on-premise servers grew too. Low-spec on-premise servers could not import binlogs in time, which then impacted other data. Splitting FILE COMPONENT vs other instances isolates this.

per-container resource limits (planned for future additional instances), plus download web server and Updater improvements per instance.

carried indexes the other did not need. Unused indexes were dropped and tables optimized to shrink size and improve performance.

OPTIMIZE-type changes are NOT replicated through binlog; they must be run on each instance independently, and binlog generation pauses for 2-4 days.

Relevant when:

maintenance, or customer download-server behavior.

Do not read full document unless:

caveat.

Linked documents:

Open Questions

improvements. Needs confirmation.

recorded). Needs confirmation.

Details

Instance separation

servers could not keep up with import, harming other data flows.

level, with container memory/resource limits, anticipating more instances later. Per-instance binlogs feed the download web server and Updater, which were to be improved accordingly (scrambling of the download web server was considered).

Index cleanup & optimization (2025-03-21 ~ 03-24)

by the other. Drop unused indexes and run OPTIMIZE to shrink size.

binlog. It must be executed on each instance (dist-m, dist-r#IDC, dist-r#in-house) separately. During the work, binlog generation stops for about 2-4 days, which can look like an error but is expected.

1. dist-M: comment out the synchronizer cron. 2. dist-R#in-house: comment out backup + rsync cron. 3. dist-r#in-house: stop BTS (docker compose down). 4. Disable binlog monitoring (set alarm flag false in the allowed-IPs config on the monitoring server). 5. dist-M: generate an index-work binlog (./flush.sh). 6. dist-M: drop indexes; verify replicas; stop replication for optimizing. 7. Run OPTIMIZE on dist-m, dist-r#idc, dist-r#in-house (2-4 days; per-instance because not replicated). 8. Manipulate the binlog files created by the work: stop dist-m, find and remove the latest binlog, edit binlog.index, restart, verify. 9. dist-R#in-house: re-enable backup + rsync cron. 10. dist-M: re-enable synchronizer cron. 11. dist-r#in-house: restart BTS (docker compose up -d).

binlogs receive 404 for 3-4 days. Some customers auto-block IPs that return 404 for security reasons, so coordinate with customers to re-open the IP.

연결 문서