feat: Go runtime v0.1.1 (pgx/v5), stress-go-pgstorm, fix invoke.go dynamic timeout, nginx ingress timeout 900s
- runtimes/go1.23: добавлен pgx/v5 v5.7.2 в go.mod, сгенерирован go.sum - runtimes/go1.23/Dockerfile: один stage golang:1.23-alpine, go mod download кеширует зависимости - internal/builder/context.go: тег Go runtime v0.1.0 → v0.1.1 - internal/api/handler/invoke.go: таймаут прокси-клиента теперь динамический из Function.Spec.TimeoutSec + 5s буфер (был хардкод 30s) - examples/POSTGRES/code/stress-go-pgstorm/handler.go: новая функция, 100 горутин, pgxpool, INSERT/COUNT/MAX, параметры: workers/duration_sec/max_delay_ms - examples/POSTGRES/resources.tf: добавлены sless_function.stress_go_pgstorm + trigger, timeout_sec=700 - deployments/k8s/operator.yaml: nginx ingress proxy-read-timeout=900s, proxy-send-timeout=900s - examples/*/main.tf: исправлен URL deck-api-test.ngcloud.ru → deck-test.ngcloud.ru (все 9 файлов) - Оператор: v0.1.39 (pgx/v5) → v0.1.40 (dynamic timeout)
This commit is contained in:
@@ -375,3 +375,33 @@ resource "sless_trigger" "stress_js_badenv_http" {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
# --- [9] Go: PG Storm — 100 горутин долбят PostgreSQL напрямую через pgxpool ---
|
||||
# Тестирует: Go runtime под конкурентной нагрузкой, pgxpool connection pool,
|
||||
# устойчивость managed PG при массовых INSERT/SELECT.
|
||||
# Параметры: workers (default 100), duration_sec (default 600), max_delay_ms (default 300).
|
||||
resource "sless_function" "stress_go_pgstorm" {
|
||||
name = "stress-go-pgstorm"
|
||||
runtime = "go1.23"
|
||||
entrypoint = "handler.Handle"
|
||||
memory_mb = 256
|
||||
timeout_sec = 700
|
||||
|
||||
env_vars = {
|
||||
PGHOST = local.pg_host
|
||||
PGPORT = "5432"
|
||||
PGDATABASE = local.pg_database
|
||||
PGUSER = local.pg_username
|
||||
PGPASSWORD = local.pg_password
|
||||
PGSSLMODE = "require"
|
||||
}
|
||||
|
||||
source_dir = "${path.module}/code/stress-go-pgstorm"
|
||||
depends_on = [sless_job.postgres_table_init_job]
|
||||
}
|
||||
resource "sless_trigger" "stress_go_pgstorm_http" {
|
||||
name = "stress-go-pgstorm-http"
|
||||
type = "http"
|
||||
function = sless_function.stress_go_pgstorm.name
|
||||
enabled = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user