Skip to content

Commit

Permalink
Docs: 클러스터링, 레플리케이션 발표자료
Browse files Browse the repository at this point in the history
  • Loading branch information
KIMSEI1124 committed Aug 8, 2024
1 parent 38e78c0 commit 834f034
Show file tree
Hide file tree
Showing 15 changed files with 139 additions and 1 deletion.
Binary file modified 240801/김정욱 - 인덱스.key
Binary file not shown.
8 changes: 8 additions & 0 deletions 240808/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions 240808/.idea/240808.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions 240808/.idea/discord.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions 240808/.idea/git_toolbox_blame.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions 240808/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions 240808/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions 240808/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions 240808/replication/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ out/

### VS Code ###
.vscode/
/docker/volumes
46 changes: 46 additions & 0 deletions 240808/replication/docker/MYSQL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# MySQL

Docker 환경에서 동작하는 MySQL의 환경설정 파일입니다.
경로는 `/etc` 에 존재합니다.

파일의 기본 내용은 아래와 같습니다.

```text
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/9.0/en/server-configuration-defaults.html
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
host-cache-size=0
skip-name-resolve
datadir=/var/lib/mysql
socket=/var/run/mysqld/mysqld.sock
secure-file-priv=/var/lib/mysql-files
user=mysql
pid-file=/var/run/mysqld/mysqld.pid
[client]
socket=/var/run/mysqld/mysqld.sock
!includedir /etc/mysql/conf.d/
```

## Ref

- [Docker를 이용하여 MySQL Replication 구성해보기](https://jupiny.com/2017/11/07/docker-mysql-replicaiton/)
- [MySQL 분산처리(Replication with docker)](https://velog.io/@hyunho058/Mysql-%EB%B6%84%EC%82%B0%EC%B2%98%EB%A6%ACReplication-with-docker)
31 changes: 31 additions & 0 deletions 240808/replication/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
services:
mysql-master:
image: mysql:latest
container_name: mysql-master
environment:
- MYSQL_ROOT_PASSWORD=1234
ports:
- "3306:3306"
volumes:
- ./volumes/master/data:/var/lib/mysql
- ./volumes/master/log:/var/log/mysql
mysql-slave-1:
image: mysql:latest
container_name: mysql-slave-1
environment:
- MYSQL_ROOT_PASSWORD=1234
ports:
- "3307:3306"
volumes:
- ./volumes/slave-1/data:/var/lib/mysql
- ./volumes/slave-1/log:/var/log/mysql
mysql-slave-2:
image: mysql:latest
container_name: mysql-slave-2
environment:
- MYSQL_ROOT_PASSWORD=1234
ports:
- "3308:3306"
volumes:
- ./volumes/slave-2/data:/var/lib/mysql
- ./volumes/slave-2/log:/var/log/mysql

This file was deleted.

4 changes: 4 additions & 0 deletions 240808/replication/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
spring:
application:
name: replication

Binary file added 240808/김정욱 - Composite Index.pdf
Binary file not shown.
Binary file not shown.

0 comments on commit 834f034

Please sign in to comment.