Собрать стенд лабораторной 5: очередь, worker и идемпотентность pipeline.

This commit is contained in:
Wladislava1
2026-11-12 13:05:02 +03:00
parent 276dbdad8a
commit a1b972f7d9
39 changed files with 5492 additions and 34 deletions
+47
View File
@@ -0,0 +1,47 @@
global
maxconn 256
tune.bufsize 65536
tune.maxrewrite 8192
defaults
mode http
timeout connect 500ms
timeout client 60s
timeout server 60s
timeout http-request 60s
timeout http-keep-alive 2s
timeout queue 2s
timeout check 800ms
option redispatch
option dontlognull
retries 2
retry-on conn-failure empty-response 502 503 504
resolvers docker
nameserver dns 127.0.0.11:53
resolve_retries 3
timeout resolve 1s
timeout retry 1s
hold valid 1s
hold other 1s
hold refused 1s
hold nx 1s
hold timeout 1s
hold obsolete 1s
accepted_payload_size 8192
frontend web
bind *:8080
default_backend api
backend api
balance roundrobin
# Короткий JSON сообщения можно повторить. Загрузку файла не повторяем:
# повтор создал бы второй объект. Тело загрузки не буферизуется целиком.
acl upload method POST path_reg -i ^/api/v1/chats/[0-9a-fA-F-]+/attachments$
http-request wait-for-body time 2s if METH_POST !upload
http-request disable-l7-retry if upload
option httpchk
http-check send meth GET uri /health/ready ver HTTP/1.1 hdr Host api
http-check expect status 200
server-template api 8 api:8080 check inter 500ms fall 2 rise 2 resolvers docker init-addr none resolve-prefer ipv4 on-marked-down shutdown-sessions
+19
View File
@@ -0,0 +1,19 @@
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": ["arn:aws:s3:::messenger-attachments/*"]
},
{
"Effect": "Allow",
"Action": ["s3:GetBucketLocation", "s3:ListBucket"],
"Resource": ["arn:aws:s3:::messenger-attachments"]
}
]
}