Comments (2)
I wonder if this could be solved instead of needing to split filtering from routing, what if instead we had a different way to execute filters to achieve the same effect. Because I think the thing that is interesting about this separation is that you could execute some filtering out of order.
I was thinking in addition to FilterChain
, we could have FilterSet
(This could also be added to FilterChain
but for the sake of discussion assume a separate type), which would allow out-of-order execution of filters, that terminates on the None
. The benefit of this, is that we leave it up to the user to decide what they want to execute out-of-order, so that they can configure it to match their business logic. I'm imagining something like the following.
// Executed in-order
FilterChain([
ValidatePacket,
// These three are executed out-of-order
FilterSet([
RateLimit,
LoadBalancer,
BlockList,
]),
// Once the set is completed, the chain continues
Compress,
Encrypt,
])
from quilkin.
I think we should revisit this, as routing using filters has already reached some limitations. For example, putting a load balancer filter in front of token router filter can drop the endpoint with the token required to route the packet, and lead to packet loss. Adding more state to routing filters only makes this more complicated and more potential foot guns for users.
Instead we should separate routing from filters entirely, I don't know if we want a Router
trait as originally proposed. I think for now we just want to support IP routing and token routing, which could supported in a single enum. So the change would be after the filter chain has run (could also be before if we want to strip the token early), the proxy's Router
decides whether to send it to a single IP or checks for a token and routes based on that.
enum Router {
Ip(SocketAddr),
LoadBalance(Vec<SocketAddr>),
Tokens(HashMap<Vec<u8>, Vec<SocketAddr>>),
}
from quilkin.
Related Issues (20)
- Move `Filter::ReadContext` to `ClusterMap`
- Redis Provider/Agent
- Benchmark error: "Resource temporarily unavailable" HOT 1
- Evaluate LTO, CGU=1, Profile-Guided Optimization (PGO) and LLVM BOLT HOT 13
- Replace iperf loadtest with fortio
- Consider Alternatives To DashMap
- Add build-step check for proto submodules HOT 1
- Add Support for Kubernetes native service routing via Gateway API v1 HOT 1
- ClusterMap::PartialEq is incredibly slow HOT 2
- Add licence.html to release quilkin.zip
- Agent <-> Relay communication is failing HOT 4
- Add lz4 compression HOT 2
- `Concatenate.Strategy.Prepend` should maybe be removed HOT 1
- Rust code generated from protobufs should be in source control
- CI is very slow HOT 1
- Cargo.lock should be committed
- Flaky Test: relay::tests::agones_token_router HOT 11
- Make delta xDS more efficient
- Documentation for xDS Delta API HOT 4
- Shutdown when getting `os error 22` when binding sockets.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quilkin.