Comments (16)
@EItanya is working on this I think, but cannot assign since they are not in the org yet
from ztunnel.
HBONE Connections between zTunnels from the same source and destination Pods/IPs should be reusable across multiple underlying client connections (streams inside HBONE).
from ztunnel.
HBONE Connections between zTunnels from the same source and destination Pods/IPs should be reusable across multiple underlying client connections (streams inside HBONE).
from ztunnel.
Speaking with Eitan, he is interested in this.
from ztunnel.
I am indeed!
from ztunnel.
@@EItanya, please update the estimated Size for this workitem.
from ztunnel.
I am off this week, but I will try and have one as soon as I'm back
from ztunnel.
Dev environment setup, start digging into actual connection pooling today.
from ztunnel.
After quite a bit of digging I have found a number of paths forward. First some background info.
The http library that ztunnel
uses is called hyper
. Hyper has it's own connection pooling mechanism build into it's http client: https://github.com/hyperium/hyper/blob/0.14.x/src/client/pool.rs
However, this implementation doesn't work in our case for a number of reasons:
- We cannot use the client impl they have due to the issue @howardjohn found hyperium/hyper#2863.
- The pooling mechanism only uses protocol/authority, but we need the client id as well. https://github.com/hyperium/hyper/blob/d32beb3843179acdaf0e64f3e708b9dbcd0c29e4/src/client/pool.rs#LL58
The three paths forward are as follows:
- Write an entirely new pooling mechanism from scratch. I do not recommend this as the code is quite complex, and
hyper
has presumably been fixing and enhancing this for quite a long time. - Copy/Paste their pooling implementation. At first I thought this would be the best path forward, but unfortunately a lot of the impl is private, so copying the pool impl would require copying their connection impl as well.
- Work with upstream to fix the few aspects of their impl that don't work for us. This is my favorite option because the number of changes are low, and the maintainer seems very willing to work with us. See this issue for reference. Just to test this hypothesis, I put the generic key impl up for review: hyperium/hyper-util#12
TLDR: I don't think it's worth rushing forward on our own implementation, or completely copy pasting unless the timeline on this requires it being done in the next 1-2 weeks. Doing either of those would in my opinion create more tech debt than is worth it.
from ztunnel.
Risk areas - 1) may not work with tokio, 2) dependency on upstream being responsive
Going w/ option 3 for now.
from ztunnel.
Waiting on updates from hyper dev
from ztunnel.
May need to handoff.
from ztunnel.
John working on a PR, ETA 1wk.
from ztunnel.
Waiting on Steven to review PR
from ztunnel.
waiting on upstream
from ztunnel.
Blocker on Hyper team has resolved, just waiting for their feedback before we commit. This task is not a blocker for anything else.
from ztunnel.
Related Issues (20)
- Provide a new label for metrics regarding destination type HOT 3
- Issue trying ambient mode on an ipv4-only k8s cluster HOT 13
- [release-1.22] h2: remove illegal double oneshot recv HOT 1
- [release-1.22] Properly handle named targetPort services
- dualstack: DNS always returns both IP families regardless of service configuration
- Support dual-stack localhost binding for DNS
- Emit end-of-process access logs
- Stress test on-demand DNS querying
- [release-1.22] Add option for disabling IPv6 HOT 1
- local_address and peer_address can panic
- Ztunnel does not scale up with number of worker threads in expected way HOT 13
- Implement DNS-over-TCP redirection HOT 1
- Do not error if the app sends a RST
- Implement improved draining HOT 14
- CVE-2023-4039 when will fix ? HOT 4
- Failure to do `apk update` when ambient captured from wolfi pods HOT 2
- Refactoring improvements now that we have a proxy-per-workload approach HOT 4
- Feature Request: Allow Customized XDS Address to be set HOT 7
- log output in json format HOT 1
- failed to connect to server "/var/run/ztunnel/ztunnel.sock" HOT 12
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 ztunnel.