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

perf: eliminate repeated route lookups in http filters #372

Closed
rshriram opened this issue Jan 24, 2017 · 4 comments · Fixed by #389
Closed

perf: eliminate repeated route lookups in http filters #372

rshriram opened this issue Jan 24, 2017 · 4 comments · Fixed by #389
Assignees
Milestone

Comments

@rshriram
Copy link
Member

The rate limit filter and the fault filter can be applied to specific upstream clusters. Currently, these filters recompute the route on their own. For performance reasons, this recomputation should be avoided. Instead, the upstream cluster chosen by the http connection manager should be made available via the some accessible interface.

@mattklein123
Copy link
Member

@mattklein123 mattklein123 self-assigned this Jan 27, 2017
@mattklein123 mattklein123 added this to the 1.2.0 milestone Jan 27, 2017
@mattklein123
Copy link
Member

In thinking about this a little bit more it's not so simple, since the current interface takes the headers as a parameter, and the headers might potentially be modified between filters. Need to think a little more about this.

mattklein123 added a commit that referenced this issue Jan 27, 2017
If multiple filters consult the route table, the same route can be looked
up many times. With large route tables, this can become quite expensive.
This change adds caching for the route lookup and changes the interfaces
so that headers are no longer passed when getting a stable route. In
the future we may need to add route cache clearing, but for now this is
fine.

fixes #372
@rshriram
Copy link
Member Author

rshriram commented Jan 27, 2017 via email

@mattklein123
Copy link
Member

See the linked PR. In general, I agree that eventually we might want to allow a filter to lookup based on headers, but the reality is that nothing needs that right now. I would rather keep it simple into that requirement comes back. The attached PR simplifies things and is a lot faster in the common case.

mattklein123 added a commit that referenced this issue Jan 30, 2017
If multiple filters consult the route table, the same route can be looked
up many times. With large route tables, this can become quite expensive.
This change adds caching for the route lookup and changes the interfaces
so that headers are no longer passed when getting a stable route. In
the future we may need to add route cache clearing, but for now this is
fine.

fixes #372
rshriram pushed a commit to rshriram/envoy that referenced this issue Oct 30, 2018
* ConfigManager downloads rollouts

* Removed metadata overriding, separated timer function

* Fixed current_rollout_id update bug

* Separated OnRolloutResponse

* Added test case for same rollout_id

* Added test case for same rollout_id

* Fixed formatting

* Moved rollout_apply_function from Init() to Constructor
wolfguoliang pushed a commit to wolfguoliang/envoy that referenced this issue Jan 23, 2021
zh-translation:docs/root/configuration/other_protocols/other_protocol…
jpsim pushed a commit that referenced this issue Nov 28, 2022
This updates our static framework rule to properly copy the `-Swift.h` header file from the bazel output directory into our final `Envoy.framework/Headers/Envoy-Swift.h`.

There are a few workarounds here for issues that @kastiglione has been nice enough to file upstream:

**bazelbuild/rules_swift#291

The code required to find and copy the `-Swift.h` header file could be simplified with this issue.

**bazelbuild/rules_apple#557

From the Objective-C demo app, we also depend on an empty Swift library to force dependencies like `swiftFoundation` to link.

Resolves envoyproxy/envoy-mobile#230

Signed-off-by: Michael Rebello <me@michaelrebello.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this issue Nov 29, 2022
This updates our static framework rule to properly copy the `-Swift.h` header file from the bazel output directory into our final `Envoy.framework/Headers/Envoy-Swift.h`.

There are a few workarounds here for issues that @kastiglione has been nice enough to file upstream:

**bazelbuild/rules_swift#291

The code required to find and copy the `-Swift.h` header file could be simplified with this issue.

**bazelbuild/rules_apple#557

From the Objective-C demo app, we also depend on an empty Swift library to force dependencies like `swiftFoundation` to link.

Resolves envoyproxy/envoy-mobile#230

Signed-off-by: Michael Rebello <me@michaelrebello.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants