Commit Graph

9 Commits

Author SHA1 Message Date
Trong Huu Nguyen
66d734358d refactor: use errgroup for coordinated server lifecycle
Move metrics and probe listeners from main.go into server.go and
manage all servers with errgroup. This replaces log.Fatalf goroutines
with proper error propagation and ties all server lifetimes together
so a failure in any listener triggers graceful shutdown of the others.
2026-05-08 07:49:17 +02:00
Trong Huu Nguyen
1939d18ba8 fix: add server timeouts to prevent goroutine/memory leak from idle keep-alive connections
Without IdleTimeout, clients holding keep-alive connections open indefinitely
caused server-side goroutines (and their ~16KB of buffers) to accumulate
linearly until OOM.
2026-05-07 16:01:11 +02:00
Sindre Rødseth Hansen
ca77435d6a feat(http): propagate traceparent for httpclient
Co-authored-by: tronghn <trong.huu.nguyen@nav.no>
2025-01-30 14:03:30 +01:00
Trong Huu Nguyen
bf83a58795 wip: tracing for http transport 2025-01-30 14:03:30 +01:00
Trong Huu Nguyen
d69cf79664 refactor: reduce noisy config logs
Fixes #262.
2024-06-26 14:51:05 +02:00
Trong Huu Nguyen
d2d281f38c fix(server): correcter error equality check 2023-10-25 10:37:56 +02:00
Trong Huu Nguyen
4a72a01496 feat(server): support wait before triggering graceful shutdown 2023-09-06 15:23:11 +02:00
Trong Huu Nguyen
b28c91c94c perf(all): use single Transport, set IdleConnTimeout
Reduces IdleConnTimeout to 5 seconds. Reverse proxying to a server that
has a shorter keep-alive may cause "EOF" and "connection reset by peer"
issues as the connections may be closed by the upstream before our
client notices.
2023-05-16 08:36:45 +02:00
Trong Huu Nguyen
c70037bd4c refactor: clean up main 2021-11-01 11:04:54 +01:00