Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(router): add configurable connection limits for each subgraph #1558

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

endigma
Copy link
Contributor

@endigma endigma commented Feb 3, 2025

  • feat(router): add configurable connection limits for each subgraph
  • test: update snapshots

Motivation and Context

Users want to configure connection limits for the router, including per-subgraph values.

Checklist

  • I have discussed my proposed changes in an issue and have received approval to proceed.
  • I have followed the coding standards of the project.
  • Tests or benchmarks have been added or updated.
  • Documentation has been updated on https://github.com/wundergraph/cosmo-docs.
  • I have read the Contributors Guide.

Example config utilizing this feature:

traffic_shaping:
  all:
    max_idle_conns: 1024
    max_conns_per_host: 100
    max_idle_conns_per_host: 20
  subgraphs:
    employees:
      max_idle_conns: 4096
      max_conns_per_host: 400
      max_idle_conns_per_host: 80

@github-actions github-actions bot added the router label Feb 3, 2025
@endigma endigma self-assigned this Feb 3, 2025
Copy link

github-actions bot commented Feb 3, 2025

Router image scan passed

✅ No security vulnerabilities found in image:

ghcr.io/wundergraph/cosmo/router:sha-b621693eac889c651674a00960a9b0bbf2412baf

@endigma endigma force-pushed the jesse/eng-6338-make-transport-connection-limits-configurable branch from 8c212c4 to e33640a Compare February 3, 2025 16:06
@endigma endigma removed their assignment Feb 5, 2025
@endigma endigma force-pushed the jesse/eng-6338-make-transport-connection-limits-configurable branch from e33640a to 7a1c6a9 Compare February 5, 2025 16:01
@endigma
Copy link
Contributor Author

endigma commented Feb 5, 2025

With the changes introduced in #1567 this PR is now a good bit simpler and the previously somewhat complex interaction with TimeoutTransport is now gone.

@endigma endigma requested a review from StarpTech February 5, 2025 16:03
@endigma endigma marked this pull request as ready for review February 5, 2025 16:07
Copy link
Contributor

@StarpTech StarpTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

router/core/graph_server.go Show resolved Hide resolved
@endigma endigma requested a review from df-wg February 6, 2025 12:43
@endigma endigma force-pushed the jesse/eng-6338-make-transport-connection-limits-configurable branch from 7a1c6a9 to 51d9837 Compare February 6, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants