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

Added 2 mermaid diagrams to demonstrate entity caching and entity cache invalidation #6260

Merged
merged 6 commits into from
Nov 14, 2024

Conversation

andrewicarlson
Copy link
Contributor

This PR adds two Mermaid diagrams demonstrating Entity Caching using a Price entity, and then a cache invalidation workflow. These are similar to the diagrams we used in the GraphQL Summit 2024 keynote, but I had to make some styling concessions to fit within the constraints of Mermaid (comments inline in the file below)

@andrewicarlson andrewicarlson requested a review from a team as a code owner November 13, 2024 19:02
@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Nov 13, 2024

✅ Docs Preview Ready

No new or changed pages found.

Copy link
Contributor

@andrewicarlson, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.

@router-perf
Copy link

router-perf bot commented Nov 13, 2024

CI performance tests

  • connectors-const - Connectors stress test that runs with a constant number of users
  • const - Basic stress test that runs with a constant number of users
  • demand-control-instrumented - A copy of the step test, but with demand control monitoring and metrics enabled
  • demand-control-uninstrumented - A copy of the step test, but with demand control monitoring enabled
  • enhanced-signature - Enhanced signature enabled
  • events - Stress test for events with a lot of users and deduplication ENABLED
  • events_big_cap_high_rate - Stress test for events with a lot of users, deduplication enabled and high rate event with a big queue capacity
  • events_big_cap_high_rate_callback - Stress test for events with a lot of users, deduplication enabled and high rate event with a big queue capacity using callback mode
  • events_callback - Stress test for events with a lot of users and deduplication ENABLED in callback mode
  • events_without_dedup - Stress test for events with a lot of users and deduplication DISABLED
  • events_without_dedup_callback - Stress test for events with a lot of users and deduplication DISABLED using callback mode
  • extended-reference-mode - Extended reference mode enabled
  • large-request - Stress test with a 1 MB request payload
  • no-tracing - Basic stress test, no tracing
  • reload - Reload test over a long period of time at a constant rate of users
  • step-jemalloc-tuning - Clone of the basic stress test for jemalloc tuning
  • step-local-metrics - Field stats that are generated from the router rather than FTV1
  • step-with-prometheus - A copy of the step test with the Prometheus metrics exporter enabled
  • step - Basic stress test that steps up the number of users over time
  • xlarge-request - Stress test with 10 MB request payload
  • xxlarge-request - Stress test with 100 MB request payload

end

subgraph PriceQueryFragment["Price Query Fragment (e.g. TTL 2200)"]
n2["` ̶{̶
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Similar to the above, I found that Mermaid didn't support the delete sequence in Markdown, so I kludged together this solution for crossing out the individual characters.

@andrewicarlson
Copy link
Contributor Author

Here are screenshots of the two diagrams rendered on the page using the docs-rewrite repo locally.

CleanShot 2024-11-13 at 14 15 52@2x CleanShot 2024-11-13 at 14 07 51@2x

Copy link
Contributor

@Meschreiber Meschreiber left a comment

Choose a reason for hiding this comment

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

These diagrams are such a great value add, ty @andrewicarlson ! I've made some suggestions to give them context and clarify the arrow directions in the invalidation diagram, but otherwise LGTM!

docs/source/routing/performance/caching/entity.mdx Outdated Show resolved Hide resolved
docs/source/routing/performance/caching/entity.mdx Outdated Show resolved Hide resolved
docs/source/routing/performance/caching/entity.mdx Outdated Show resolved Hide resolved
@andrewicarlson andrewicarlson merged commit af9773a into dev Nov 14, 2024
13 of 14 checks passed
@andrewicarlson andrewicarlson deleted the feature/add-entity-caching-diagrams-to-docs branch November 14, 2024 19:10
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.

4 participants