Skip to content
Open

1 #6

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions 1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Домашнее задание к занятию 2 «Кластеризация и балансировка нагрузки»
**Косарев Д.О.**

## Задание 1:

### Конфигурационный файл HAProxy:
[roundrobin-l4.cfg](haproxy-configs/roundrobin-l4.cfg)

### Скриншоты:
![Скриншот работы HAProxy](images/Screenshot%20from%202025-10-07%2023-19-21.png)

## Задание 2:

### Конфигурационный файл HAProxy:
[weighted-l7.cfg](haproxy-configs/weighted-l7.cfg)

### Скриншоты:
![Скриншот 1 - Запросы с доменом example.local](images/Screenshot%20from%202025-10-07%2023-27-26.png)

![Скриншот 2 - Распределение по весам](images/Screenshot%20from%202025-10-07%2023-34-13.png)

![Скриншот 3 - Ошибка 404 без домена](images/Screenshot%20from%202025-10-07%2023-42-05.png)
18 changes: 18 additions & 0 deletions 1/haproxy-configs/roundrobin-l4.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
global
daemon
maxconn 256

defaults
mode tcp
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms

frontend http_front
bind *:8080
default_backend http_back

backend http_back
balance roundrobin
server web1 127.0.0.1:8001 check
server web2 127.0.0.1:8002 check
25 changes: 25 additions & 0 deletions 1/haproxy-configs/weighted-l7.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
global
daemon
maxconn 256

defaults
mode http
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
option httplog

frontend http_front
bind *:8080
acl is_example_local hdr(host) -i example.local
use_backend http_back if is_example_local
default_backend no_match

backend http_back
balance roundrobin
server web1 127.0.0.1:8001 weight 2 check
server web2 127.0.0.1:8002 weight 3 check
server web3 127.0.0.1:8003 weight 4 check

backend no_match
errorfile 503 /etc/haproxy/errors/404.http
Binary file added 1/images/Screenshot from 2025-10-07 23-19-21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 1/images/Screenshot from 2025-10-07 23-27-26.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 1/images/Screenshot from 2025-10-07 23-34-13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 1/images/Screenshot from 2025-10-07 23-42-05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
# Домашние задания по модулю «Отказоустойчивость»
# Домашнее задание к занятию 3 «Резервное копирование» Косарев Д.О.

В этом репозитории расположены ваши домашние задания к каждой лекции.
## Задание 1
rsync -avh --checksum --exclude='.*' /home/kosarev/ /tmp/backup/

Обязательны к выполнению задачи без звездочек. Их нужно выполнить, чтобы получить зачёт.

Задачи со звёздочкой (*) — дополнительные задачи или задачи повышенной сложности. Их выполнять не обязательно, но они помогут вам глубже понять тему.

Любые вопросы по решению задач задавайте в чате учебной группы. Ссылку вы найдёте в письме на вашей электронной почте.


1. [Disaster recovery и Keepalived](1.md)

2. [Кластеризация и балансировка нагрузки](2.md)

3. [Резервное копирование](3.md)

4. [Отказоустойчивость в облаке](4.md)
![Результат выполнения rsync](./Screenshot%20from%202025-10-07%2021-27-22.png)

## Задание 2
![Результат работы скрипта](./Screenshot%20from%202025-10-07%2021-41-50.png)
Binary file added Screenshot from 2025-10-07 21-27-22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshot from 2025-10-07 21-41-50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.