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)
- Quilkin not proxying on IPv4 HOT 7
- Add configuration to modify downstream channel size
- Fix Last Agones Test From Refactor HOT 1
- Phoenix HTTP service stops responding after some amount of time
- QCMP pings seem to be returning the wrong information.
- Stream metrics don't seem always reliable
- Datacenter map doesn't seem to be kept up to date in proxies
- Improve deserialisation errors in the Kubernetes provider
- Add support for `--address-type` option to Agones agent HOT 4
- Investigate eBPF Support
- Proxy doesn't remember which IP address it received on when sending packets back to the client HOT 9
- Gameserver events are failing due parsing errors
- Unit tests intermittently fails HOT 1
- `EndpointAddress` should be resolved once HOT 2
- Make filters static dispatch? HOT 3
- io_uring threads can get into high CPU condition HOT 3
- Agent's Kubernetes provider should not depend on ConfigMap
- Proxy Static Configuration defaults to an empty HashMap when using HashedTokenRouter filter HOT 1
- First connection to newly allocated gameserver using Proxy Dynamic Configuration with HashedTokenRouter filter is flaky
- Changes To The ConfigMap in the Relay aren't being picked up by proxies HOT 3
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.