diff --git a/.env.example b/.env.example index a8ada78..a06739a 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,7 @@ APP_NAME=inno-live-server APP_ENV=local DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/inno_live_server WEBRTC_STUN_URLS=stun:stun.l.google.com:19302 -WEBRTC_TURN_URLS= +WEBRTC_TURN_URLS=turn:innolive.duckdns.org:3478?transport=udp,turn:innolive.duckdns.org:3478?transport=tcp,turns:innolive.duckdns.org:5349?transport=tcp WEBRTC_TURN_USERNAME= WEBRTC_TURN_CREDENTIAL= WEBRTC_ANNOUNCED_IP= diff --git a/.gitignore b/.gitignore index 47aa6c0..002afd2 100644 --- a/.gitignore +++ b/.gitignore @@ -14,5 +14,6 @@ loadtest/pion-client/results/ loadtest/pion-client/.gocache/ loadtest/pion-client/*.exe loadtest/server-results/ +loadtest/results/ loadtest/videos/* !loadtest/videos/README.md diff --git a/README.md b/README.md index 8bff028..bf5fb68 100644 --- a/README.md +++ b/README.md @@ -219,7 +219,7 @@ Configure the server with environment variables: ```bash WEBRTC_STUN_URLS=stun:stun.l.google.com:19302 -WEBRTC_TURN_URLS=turn:turn.example.com:3478?transport=udp +WEBRTC_TURN_URLS=turn:innolive.duckdns.org:3478?transport=udp,turn:innolive.duckdns.org:3478?transport=tcp,turns:innolive.duckdns.org:5349?transport=tcp WEBRTC_TURN_USERNAME= WEBRTC_TURN_CREDENTIAL= WEBRTC_ANNOUNCED_IP= diff --git a/SERVER_STRUCTURE.md b/SERVER_STRUCTURE.md index c80f73a..4b5e2f4 100644 --- a/SERVER_STRUCTURE.md +++ b/SERVER_STRUCTURE.md @@ -160,7 +160,7 @@ Status: active → closing → closed | 설정 | 기본값 | 설명 | |------|--------|------| | `webrtc_stun_urls` | `stun:stun.l.google.com:19302` | STUN 서버 URL | -| `webrtc_turn_urls` | (비어있음) | TURN 서버 URL (선택사항) | +| `webrtc_turn_urls` | `turn:innolive.duckdns.org:3478?transport=udp`, `turn:innolive.duckdns.org:3478?transport=tcp`, `turns:innolive.duckdns.org:5349?transport=tcp` | TURN UDP/TCP/TLS 서버 URL | | `webrtc_turn_username` | null | TURN 인증 사용자명 | | `webrtc_turn_credential` | null | TURN 인증 자격증명 | | `webrtc_announced_ip` | null | 호스트 candidate IP 교체용 공개 IP | diff --git a/app/core/config.py b/app/core/config.py index 083b692..35b71f6 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -10,7 +10,11 @@ class Settings(BaseSettings): app_env: str = "local" log_level: str = "INFO" webrtc_stun_urls: str = "stun:stun.l.google.com:19302" - webrtc_turn_urls: str = "" + webrtc_turn_urls: str = ( + "turn:innolive.duckdns.org:3478?transport=udp," + "turn:innolive.duckdns.org:3478?transport=tcp," + "turns:innolive.duckdns.org:5349?transport=tcp" + ) webrtc_turn_username: str | None = None webrtc_turn_credential: str | None = None webrtc_announced_ip: str | None = None diff --git a/loadtest/scripts/analyze_bypass_runs.py b/loadtest/scripts/analyze_bypass_runs.py new file mode 100644 index 0000000..839859c --- /dev/null +++ b/loadtest/scripts/analyze_bypass_runs.py @@ -0,0 +1,504 @@ +#!/usr/bin/env python3 +"""Aggregate repeated Pion bypass runs with matching Windows server metrics.""" + +from __future__ import annotations + +import argparse +import csv +import hashlib +import json +import math +import re +import statistics +from collections import defaultdict +from datetime import datetime, timedelta, timezone +from pathlib import Path +from typing import Any, Iterable + + +RUN_RE = re.compile( + r"^bypass-(?P1|2|4|8)-clients-5m-cycle(?P[123])\.json$" +) +CONNECTED_RE = re.compile( + r"^(?P