How I learned to stop worrying and love userspace networking
friendshipcastle.zip
friendshipcastle.zip
> Who says you need to do networking in the kernel though?
I thought it implied they were bypassing the kernel entirely. This isn't true at all if it's still using a UDP socket to send... there's still a ton of code in the kernel to handle sending and receiving UDP. It's also a helluva lot less efficient in terms of CPU consumed, unless one is using sendmmsg, because it's a syscall per tiny datagram between user space and kernel space to get the data onto the UDP socket...
There are near-total bypass solutions, in which the bulk of the code is the same as you'd use with this WireGuard bypass, where ultra-high performance is the goal, and you're wiring userland up to get packets directly to and from the card DMA rings. That's a possible thing to do too, but you basically need to build the whole system around what you're doing. The WireGuard thing you can do as an unprivileged user --- that is, you can ship an application to your users that does it, without them having to care.
Long story short: sometimes this is about perf, here though not so much.
I hope, by "you", you mean the rest of us journeymen and not this tptacek [0]
[0] https://fly.io/blog/bpf-xdp-packet-filters-and-udp/ / https://archive.md/TVIyy
Also, "no" about what? DPDK doesn’t just expose the PCIE device to user land. There is what you call the yak shaving with memory and then it also has a full driver from the NIC so you can actually you know do networking.
https://www.man7.org/linux/man-pages/man7/packet.7.html
There are more modern interfaces which perform better.
Today I learned!
(this was while developing a router, so the under development network driver process crashing was a frequent situation)
A lot of applications don’t handle the DEVICE_RESET event, though, so you’re likely to see them crash if the driver resets. Firefox used to have a bug where video playback stopped working after a driver reset, but that’s been fixed.
A lot of the pushback against Kubernetes revolves around whether you 'rewlly need it' or whether to do something else. Seeing someone go past running containers like this highlights the extensibility, shows the core of Kubernetes as a pattern & paradigm for building any kind of platform.
It's neat seeing that done so quickly & readily here. That we can add and manage anything, consistently, quickly, is a promise that I love seeing fulfilled.
But nothing is stopping you from just joining all your hosts into the VPN, just like a traditional deployment. Or set it up on your network gateway. This would make it available to all of your containers. Great. You're done.
But if that's not what you want, you'll need to figure something out.
What is the "normal" best practice here then? I would just spin up multiple single-node k3s VM clusters and hook the AI k3s VM to the VPN and the others not.
I didn't, that was someone else. I wouldn't say any kind of platform, but it is a great foundation for many platforms.
> it suddenly turns into a no, not like that
Not at all. Read my post and the OP again! Several valid solutions have been offered, some that work out of the box, some that require a little tinkering.
If you want to do a traditional VM deployment you'd segment your workloads per hosts and put some hosts in the VPN. Sure. Cool. You can do exactly the same with kubernetes with node pools.
Only when you want to have some workloads that have access and some that don't running on the same host machine you might need to do some tinkering. Just like you'd have to do otherwise. Kubernetes really changes nothing, other than giving you ways to deal with it.
Of course there's plenty of ready built solutions for this you can just plug in, too. Search for Service Mesh.
There is Multus, which is extremely well regarded CNI that enables mixing and matching different CNI Plugins. It works great, but it does involve diving into an additional level of complexity, and it can be exciting/unstable building the setup.
Maybe the author didn't have rights over the cluster to do this or interest in mucking about deeply in this admittedly complex/highly capable system was limited. Or maybe just using an adding like this was appealing as non disruptive! This seems like a pretty creative & direct way to extend what they already had. There are good well tread options for higher power, for mixed modes of networking, but this strikes me as a nice way to add more without having to revamp the base cluster, which I found super cool & direct.
Kubernetes tries to be everything to everyone and makes the entire thing too complicated. Seeing Kubernetes broken up into smaller, more purpose built components and let folks pick and choose or swap could be helpful, at the risk of it becoming OpenStack.
There's an alternate reality where Fleet is the defacto scheduler and cats and dogs live together in harmony.
Same for Kubernetes: Distributions which pack everything you need in an opinionated way, so that it's easy to use. Now it's kinda build-your-own-kubernetes at every platform: kubeadm, EKS etc all require you to install various add-on components before you have a fully suitable cluster.
Wouldn't it be more accurate to state Kubernetes at its core is a distributed control plane?
You want something that inspects the state of a distributed system and mutates it as necessary to reach some "desired state". That's the control plane bit. For fault tolerance, the control plane itself needs to be distributed. This is the exact reason for Kubernetes' existence.
For a while some of the managers were packaged together into some core, but that's no longer true. Yes it still resembles most people's use case too. But neither of these technical truths convince me that this incidental happenstance is a core truth.
I haven't heard any arguments for why you think it's "too complicated" to be an extensible platform, and I struggle to imagine what you would rest those arguments upon. There's a restful API server and folks watch the api-server with operators and write code to make sure the real world resembles that desired state, best as they can. There's so many hundreds of operators, and it seems not-hard for many. So, like, what's so scary about that?
But you insist on calling it "a dumb scheduler API" which again is using bad definitions to argue a bad point that you can't make in good faith recognition of what's actually at stake here, that contorts the view to a dumber simpler wrong view of what's happening.
> Seeing Kubernetes broken up into smaller, more purpose built components and let folks pick and choose or swap could be helpful
This is the exact opposite of what most people ask for, which are integrated kube distros. And they ask for that because kube is a collection of different isolated pieces that happen to compound into something bigger. You already have your wish, you just don't see it.
Personally I think you should always be using containerization, because even single node Docker is easy. If you are running something for real, then definitely use Kubernetes.
If you are using containerization, setting up Tailscale is trivial.
Whenever you abstract away something, you can swap out core components like networking willy nilly. Of course, you can always over-abstract, but a healthy amount is wonderful for most non-very high performance use cases.
however, i'm not sure yet how it's useful outside of fly.io. It seems odd to say "I like to self host" and then yield to fly.io.
The first time I saw it, in senior high school, I understood nothing of it. It was just weird. I saw it again in my late 30s and realized it was a great movie – however, I will admit that it’s quite hard for me to articulate why it’s so good. I guess it says something about society and being human, but the wisdom is not at all on-the-nose.
Sbe zr gur zbivr jnf nzhfvat ohg dhvgr pbashfvat hagvy V fybjyl fgnegrq gb ernyvmr ab bar va gur punva bs pbzznaq bs gur ahxrf vf rira erzbgryl fnar. Guvf jnfa'g n fhqqra ernyvmngvba ohg zber ercrngrqyl ernyvmvat gur fnzr guvat nobhg qvssrerag punenpgref. Pyrneyl fbzr ner zber fnar guna bguref, ohg abar bs gurz pbzr pybfr gb jung V'q qrfpevor nf npghnyyl fnar.
Nqq gb gung gur nofheqvfg uhzbe bs gur cerpvbhf obqvyl syhvqf fcrrpu be gur arrqvat gb svaq n dhnegre sbe gur cnlcubar naq lbh'ir tbg n terng zbivr. Vg'f bar cneg pbzrql bar cneg fpnguvat pevgvpvfz nobhg rira gur pbaprcg bs univat na ngbzvp obzo ng nyy.