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

[DX-1688, TT-13153] endpoint level rate limits #5409

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

jeffy-mathew
Copy link
Contributor

@jeffy-mathew jeffy-mathew commented Sep 16, 2024

User description

For internal users - Please add a Jira DX PR ticket to the subject!



Preview Link

https://deploy-preview-5409--tyk-docs.netlify.app/docs/nightly/getting-started/key-concepts/rate-limiting/
https://deploy-preview-5409--tyk-docs.netlify.app/docs/nightly/basic-config-and-security/control-limit-traffic/rate-limiting/


Description


Screenshots (if appropriate)


Checklist

  • I have added a preview link to the PR description.
  • I have reviewed the suggestions made by our AI (PR Agent) and updated them accordingly (spelling errors, rephrasing, etc.)
  • I have reviewed the guidelines for contributing to this repository.
  • I have read the technical guidelines for contributing to this repository.
  • Make sure you have started your change off our latest master.
  • I labeled the PR

PR Type

documentation


Description

  • Added comprehensive documentation for configuring key-level per-endpoint rate limits in Tyk Dashboard.
  • Introduced the concept of key-level per-endpoint rate limits in the key concepts section.
  • Updated the guidance on selecting appropriate rate limiting levels based on user needs.
  • Revised the order of assessment when multiple rate limits are configured to include per-endpoint limits.

Changes walkthrough 📝

Relevant files
Documentation
rate-limiting.md
Add documentation for key-level per-endpoint rate limits 

tyk-docs/content/basic-config-and-security/control-limit-traffic/rate-limiting.md

  • Added section on setting up key-level per-endpoint rate limits.
  • Provided detailed steps for configuring endpoint-level rate limits in
    Tyk Dashboard.
  • Included notes on assumptions for endpoint-level rate limits.
  • +21/-0   
    rate-limiting.md
    Update key concepts with per-endpoint rate limiting           

    tyk-docs/content/getting-started/key-concepts/rate-limiting.md

  • Introduced key-level per-endpoint limit concept.
  • Updated guidance on choosing rate limiting levels.
  • Revised order of assessment for multiple rate limits.
  • +3/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link

    netlify bot commented Sep 16, 2024

    PS. Pls add /docs/nightly to the end of url

    Name Link
    🔨 Latest commit 8ad7729
    🔍 Latest deploy log https://app.netlify.com/sites/tyk-docs/deploys/66f6b7f719766b0008a10275
    😎 Deploy Preview https://deploy-preview-5409--tyk-docs.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify site configuration.

    Copy link
    Contributor

    @andyo-tyk andyo-tyk left a comment

    Choose a reason for hiding this comment

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

    Some minor suggestions

    @andyo-tyk andyo-tyk changed the title endpoint level rate limits [TT-13153] endpoint level rate limits Sep 23, 2024
    @jeffy-mathew jeffy-mathew force-pushed the feat/TT-12564/endpoint-rate-limits branch from 7603c4e to f3b4761 Compare September 24, 2024 08:35
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No key issues to review

    Copy link
    Contributor

    github-actions bot commented Sep 24, 2024

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    Correct a typo in the documentation

    Correct the typo in the word "endpont" to "endpoint" to maintain the professionalism
    and accuracy of the documentation.

    tyk-docs/content/basic-config-and-security/control-limit-traffic/rate-limiting.md [80]

    -if a policy grants access to an API endpoint with `rate=5 per=60` then three clients using keys generated from that policy will each independently be able to make 5 requests in any 60 second period to that particular endpont of the API before receiving the `HTTP 429 Too Many Requests` error.
    +if a policy grants access to an API endpoint with `rate=5 per=60` then three clients using keys generated from that policy will each independently be able to make 5 requests in any 60 second period to that particular endpoint of the API before receiving the `HTTP 429 Too Many Requests` error.
     
    Suggestion importance[1-10]: 9

    Why: The suggestion correctly identifies and fixes a typo, improving the professionalism and accuracy of the documentation.

    9
    Enhancement
    Clarify the reference to a specific middleware in the documentation

    Replace the ambiguous phrase "the [ignore authentication]" with a more specific
    reference to avoid confusion, such as "the 'Ignore Authentication' middleware".

    tyk-docs/content/basic-config-and-security/control-limit-traffic/rate-limiting.md [87]

    -- the [ignore authentication]({{< ref "product-stack/tyk-gateway/middleware/ignore-middleware" >}}) middleware is not turned enabled for these endpoints
    +- the 'Ignore Authentication' middleware is not enabled for these endpoints
     
    Suggestion importance[1-10]: 8

    Why: The suggestion improves clarity by specifying the middleware name, reducing potential confusion for readers.

    8
    Improve clarity of instructions by specifying UI elements

    Clarify the instruction by specifying the UI element to interact with, such as
    "click on the 'Add Rate Limit' button".

    tyk-docs/content/basic-config-and-security/control-limit-traffic/rate-limiting.md [95]

    -Under **API Access** -> **Set endpoint-level usage limits** click on **Add Rate Limit** to configure the rate limit.
    +Under **API Access** -> **Set endpoint-level usage limits**, click on the 'Add Rate Limit' button to configure the rate limit.
     
    Suggestion importance[1-10]: 7

    Why: The suggestion enhances the clarity of the instructions by specifying the UI element, making it easier for users to follow.

    7
    Best practice
    Standardize terminology in the documentation

    Ensure consistency in terminology by replacing "Save/Update" with a consistent term,
    such as "Save Changes".

    tyk-docs/content/basic-config-and-security/control-limit-traffic/rate-limiting.md [96]

    -4. **Save/Update** the policy
    +4. **Save Changes** to the policy
     
    Suggestion importance[1-10]: 6

    Why: The suggestion promotes consistency in terminology, which is a good practice for maintaining clear and professional documentation.

    6

    Copy link
    Contributor

    @andyo-tyk andyo-tyk left a comment

    Choose a reason for hiding this comment

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

    LGTM, thanks.

    @andyo-tyk andyo-tyk changed the title [TT-13153] endpoint level rate limits [DX-1688, TT-13153] endpoint level rate limits Sep 24, 2024
    @letzya
    Copy link
    Collaborator

    letzya commented Sep 25, 2024

    @jeffy-mathew @andyo-tyk going forward, please check the PR Code Suggestions bot. It found a typo etc.

    Copy link
    Collaborator

    @letzya letzya left a comment

    Choose a reason for hiding this comment

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

    Maybe a couple of suggestions + check my slack message @jeffy-mathew

    @@ -69,6 +71,7 @@ When multiple rate limits are configured, they are assessed in this order (if ap
    1. API-level global rate limit
    2. Key-level global rate limit
    3. Key-level per-API rate limit
    4. Key-level per-endpoint rate limit
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    @jeffy-mathew we also have API-level per-endpoint rate limit

    @letzya letzya marked this pull request as draft September 27, 2024 13:49
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    4 participants