Skip to content

feat: support multiple backends per proxy config - #68

Open
pheelee wants to merge 1 commit into
mainfrom
feature/multiple-backends
Open

feat: support multiple backends per proxy config#68
pheelee wants to merge 1 commit into
mainfrom
feature/multiple-backends

Conversation

@pheelee

@pheelee pheelee commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the ability to configure multiple backend servers for a single proxy entry. Traefik will load-balance traffic across all configured backends automatically.

Changes

Backend

  • config/userinput.go: Changed UserInput.Backend (single) to Backends []Backend (slice, up to 5 entries). Updated ValidationError accordingly. Validate() checks each non-empty backend URL and requires at least one.
  • config/config.go: FromUserInput builds loadBalancer.servers from all non-empty backends. ToUserInput maps all servers back to the Backends slice.
  • internal/server/server.go: Health checks now run concurrently across all backends for both List and Save handlers.

Frontend

  • Editor form: Shows 5 backend input fields (Backend 1-5) with per-field validation errors.
  • Config card: Lists each configured backend URL with its individual health indicator.
  • Filter: Searches across all backend URLs.

Testing

All existing tests updated and passing. Build verified.

- Change UserInput.Backend (single) to Backends []Backend (slice)
- Validate each non-empty backend URL; require at least one
- FromUserInput builds Traefik loadBalancer.servers from all non-empty backends
- ToUserInput maps all loadbalancer servers back to the Backends slice
- Concurrent health checks for all backends in List and Save handlers
- Frontend: editor shows 5 backend input fields (Backend 1–5)
- Frontend: card displays each configured backend with its health status
- Frontend: filter searches across all backend URLs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant