Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,31 @@ This creates a clean foundation for future improvements such as:
- parallelized health probes
- advanced balancing strategies

## 2026-05-17

### Added

- Added configurable backend connection timeouts
- Added configurable idle connection timeouts (connection reaper)
- Added timeout support to TCP proxy logic using `tokio::time::timeout`
- Added `connect_timeout_secs` and `idle_timeout_secs` to YAML configuration
- Added duration-based timeout tracking in `AppState`

### Changed

- Refactored `src/proxy/tcp.rs` to wrap async operations with timeouts
- Improved proxy error handling to distinguish between connection failures and timeouts
- Updated `AppState` to pre-calculate `Duration` objects for timeouts

### Notes

Laminar is now significantly more resilient against "cascading failures" caused by slow or unresponsive backends.
The implementation of connection and idle timeouts ensures that:

- a "black hole" backend (dropping packets) won't hang the proxy task indefinitely
- inactive or "dead" connections are automatically reaped to prevent resource exhaustion
- failed connection attempts due to timeouts trigger automatic failover to the next healthy backend

---

## 2026-05-16
Expand Down
8 changes: 4 additions & 4 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
- [x] Forward backend → client traffic
- [x] Support bidirectional forwarding
- [x] Handle disconnect propagation
- [ ] Add connection timeout handling
- [ ] Add idle timeout handling
- [x] Add connection timeout handling
- [x] Add idle timeout handling

---

Expand Down Expand Up @@ -116,8 +116,8 @@

## Timeout Management

- [ ] Backend connect timeout
- [ ] Idle connection timeout
- [x] Backend connect timeout
- [x] Idle connection timeout
- [ ] Read timeout
- [ ] Write timeout

Expand Down
Loading