ЛР 3: балансировка, общая идемпотентность и исследование масштабирования

This commit is contained in:
Quzzqq
2026-11-06 16:47:34 +03:00
parent 0ab3a341aa
commit a14b013307
387 changed files with 350577 additions and 38 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env python3
import os
import time
import urllib.request
url = os.getenv('BASE_URL', 'http://localhost:8080') + '/health/ready'
deadline = time.monotonic() + 90
while True:
try:
with urllib.request.urlopen(url, timeout=2) as response:
if response.status == 200:
print('PASS: LB readiness')
break
except OSError:
pass
if time.monotonic() >= deadline:
raise SystemExit('Readiness timeout')
time.sleep(0.5)