Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

rate-limiting: add HTTP local rate limiting capability #4846

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

shashankram
Copy link
Member

Description:

  • Adds capability to locally (per sidecar) rate limit
    HTTP traffic

  • Adds HTTP rate limit e2e test

  • Clarifies allowed HTTP status codes for rate limited
    responses

Part of #2018

Testing done:
Unit tests, e2e tests

Affected area:

Functional Area
New Functionality [X]
Control Plane [X]

Please answer the following questions with yes/no.

  1. Does this change contain code from or inspired by another project? no

    • Did you notify the maintainers and provide attribution?
  2. Is this a breaking change? no

  3. Has documentation corresponding to this change been updated in the osm-docs repo (if applicable)? will be updated post merge

- Adds capability to locally (per sidecar) rate limit
  HTTP traffic

- Adds HTTP rate limit e2e test

- Clarifies allowed HTTP status codes for rate limited
  responses

Part of openservicemesh#2018

Signed-off-by: Shashank Ram <shashr2204@gmail.com>
Expect(err).ToNot((HaveOccurred()))

// Expect client to receive 429 (Too Many Requests)
cond = Td.WaitForRepeatedSuccess(func() bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

Alternatively, we can use the fortio toolkit to set traffic RPS and test rate limiting.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, this was a lot easier though to test the basic scenario.

@shashankram shashankram merged commit f3966a3 into openservicemesh:main Jun 24, 2022
@shashankram shashankram deleted the rl-http branch June 24, 2022 21:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants