Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oleksiikraievyi/highload-sw-arch-hw-19
HW 19 for highload software architecture courses. https://prjctr.com/course/highload-software-architecture?gclid=EAIaIQobChMI7OOMjvf78wIVRjcYCh1axwtgEAAYASAAEgKm2_D_BwE
https://github.com/oleksiikraievyi/highload-sw-arch-hw-19
Last synced: 11 days ago
JSON representation
HW 19 for highload software architecture courses. https://prjctr.com/course/highload-software-architecture?gclid=EAIaIQobChMI7OOMjvf78wIVRjcYCh1axwtgEAAYASAAEgKm2_D_BwE
- Host: GitHub
- URL: https://github.com/oleksiikraievyi/highload-sw-arch-hw-19
- Owner: oleksiikraievyi
- Created: 2022-01-19T16:38:27.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-19T17:08:49.000Z (about 3 years ago)
- Last Synced: 2024-06-20T05:13:27.205Z (7 months ago)
- Language: Shell
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# highload-sw-arch-hw-19
# Prerequisites
* docker
* linux + bash# 1. Run MySQL master and 2 slaves, table users will be created and inserted in infinite loop on master server
```
./run.sh
```# 2. Check tables on slave1 and slave2, everything should be replicated
```
docker exec mysql_slave1 sh -c "export MYSQL_PWD=111; mysql -u root -e 'USE mydb; SELECT * FROM users;'"
docker exec mysql_slave2 sh -c "export MYSQL_PWD=111; mysql -u root -e 'USE mydb; SELECT * FROM users;'"
```# 3. Stop slave1, check that data on slave2 is replicated
```
docker-compose stop mysql_slave1
```# 4. Drop column on slave1, check that replication is broken
```
Error 'Unknown column 'name' in 'field list'' on query. Default database: ''. Query: 'INSERT INTO mydb.users (name) VALUES ("name")'
```# 5. Clean up
```
./cleanup.sh
```