Document router-level in-flight request deduplication#62
Merged
kamilkisiela merged 7 commits intoApr 2, 2026
Merged
Conversation
…edupe) Co-authored-by: kamilkisiela <8167190+kamilkisiela@users.noreply.github.com> Agent-Logs-Url: https://github.com/graphql-hive/docs/sessions/48a7439a-30d4-4a63-9ea7-1a1bb9baf7e2
Copilot
AI
changed the title
[WIP] Document request deduplication and traffic shaping configurations
Document router-level in-flight request deduplication
Mar 24, 2026
| GraphQL operations arrive simultaneously, the router sends only one request to subgraphs and shares | ||
| the response with all waiting clients. | ||
| The router supports two complementary levels of in-flight request deduplication that can be enabled | ||
| independently: **router-level** (new in recent versions) and **subgraph-level**. |
Contributor
There was a problem hiding this comment.
Suggested change
| independently: **router-level** (new in recent versions) and **subgraph-level**. | |
| independently: **router-level** and **subgraph-level**. |
Comment on lines
+124
to
+149
| ```yaml | ||
| traffic_shaping: | ||
| router: | ||
| dedupe: | ||
| enabled: true | ||
| headers: all # default — include every header | ||
| ``` | ||
|
|
||
| ```yaml | ||
| traffic_shaping: | ||
| router: | ||
| dedupe: | ||
| enabled: true | ||
| headers: none # ignore all headers (requests from any user may be deduplicated) | ||
| ``` | ||
|
|
||
| ```yaml | ||
| traffic_shaping: | ||
| router: | ||
| dedupe: | ||
| enabled: true | ||
| headers: | ||
| include: # include only these headers in the fingerprint | ||
| - authorization | ||
| - cookie | ||
| ``` |
Co-authored-by: kamilkisiela <8167190+kamilkisiela@users.noreply.github.com> Agent-Logs-Url: https://github.com/graphql-hive/docs/sessions/94054bfc-ee33-4d78-bce2-e8fa5674a497
Co-authored-by: kamilkisiela <8167190+kamilkisiela@users.noreply.github.com> Agent-Logs-Url: https://github.com/graphql-hive/docs/sessions/b092cd0a-de49-4d90-8b0d-d90d222721be
|
Co-authored-by: kamilkisiela <8167190+kamilkisiela@users.noreply.github.com> Agent-Logs-Url: https://github.com/graphql-hive/docs/sessions/748b7086-b9fe-4bb1-a2c6-61fffa2b1934
Co-authored-by: kamilkisiela <8167190+kamilkisiela@users.noreply.github.com> Agent-Logs-Url: https://github.com/graphql-hive/docs/sessions/35bff6bb-7f05-4563-a948-b881a07f71e0
dotansimha
approved these changes
Mar 24, 2026
kamilkisiela
added a commit
to graphql-hive/router
that referenced
this pull request
Mar 24, 2026
- Add inbound router request deduplication for concurrent identical
GraphQL requests, with atomic in-flight key claiming and leader/joiner
response sharing.
- Feature behind `traffic_shaping.router.dedupe.enabled` (default: false
- but I'm open to change it. I made it 'all' and disabled by default as
anything that makes a request "unique" affects the request fingerprint
and therefore deduplication), and include current schema checksum in the
dedupe fingerprint to prevent cross-schema sharing.
- Restrict response sharing to `query` operations only
```yaml
traffic_shaping:
router:
dedupe:
enabled: true # default
headers: all # default
```
---
The deduplication key is built out of:
- request method and path
- selected request headers (based on dedupe header policy - see examples
below)
- normalized operation hash
- GraphQL variables hash
- GraphQL extensions hash
- schema checksum
Header policy: include all headers in the req fingerprint
```yaml
headers: all
```
Header policy: do not include headers in the req fingerprint
```yaml
headers: none
```
Header policy: include only some headers in the req fingerprint
```yaml
headers:
include:
- authorization
- cookie
```
Docs: graphql-hive/docs#62
Copilot AI
pushed a commit
to graphql-hive/router
that referenced
this pull request
Mar 24, 2026
- Add inbound router request deduplication for concurrent identical
GraphQL requests, with atomic in-flight key claiming and leader/joiner
response sharing.
- Feature behind `traffic_shaping.router.dedupe.enabled` (default: false
- but I'm open to change it. I made it 'all' and disabled by default as
anything that makes a request "unique" affects the request fingerprint
and therefore deduplication), and include current schema checksum in the
dedupe fingerprint to prevent cross-schema sharing.
- Restrict response sharing to `query` operations only
```yaml
traffic_shaping:
router:
dedupe:
enabled: true # default
headers: all # default
```
---
The deduplication key is built out of:
- request method and path
- selected request headers (based on dedupe header policy - see examples
below)
- normalized operation hash
- GraphQL variables hash
- GraphQL extensions hash
- schema checksum
Header policy: include all headers in the req fingerprint
```yaml
headers: all
```
Header policy: do not include headers in the req fingerprint
```yaml
headers: none
```
Header policy: include only some headers in the req fingerprint
```yaml
headers:
include:
- authorization
- cookie
```
Docs: graphql-hive/docs#62
dotansimha
pushed a commit
to graphql-hive/router
that referenced
this pull request
Apr 13, 2026
- Add inbound router request deduplication for concurrent identical
GraphQL requests, with atomic in-flight key claiming and leader/joiner
response sharing.
- Feature behind `traffic_shaping.router.dedupe.enabled` (default: false
- but I'm open to change it. I made it 'all' and disabled by default as
anything that makes a request "unique" affects the request fingerprint
and therefore deduplication), and include current schema checksum in the
dedupe fingerprint to prevent cross-schema sharing.
- Restrict response sharing to `query` operations only
```yaml
traffic_shaping:
router:
dedupe:
enabled: true # default
headers: all # default
```
---
The deduplication key is built out of:
- request method and path
- selected request headers (based on dedupe header policy - see examples
below)
- normalized operation hash
- GraphQL variables hash
- GraphQL extensions hash
- schema checksum
Header policy: include all headers in the req fingerprint
```yaml
headers: all
```
Header policy: do not include headers in the req fingerprint
```yaml
headers: none
```
Header policy: include only some headers in the req fingerprint
```yaml
headers:
include:
- authorization
- cookie
```
Docs: graphql-hive/docs#62
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
traffic_shaping.mdx(CI format:check failure)⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.