https://elixir.bootlin.com/linux/latest/source/include/linux...
Also docker NAT will add significant latency if you don’t use host network mode.
When microseconds matter, everything matters. Any intermediate program would be suspect.
"Container" (namespace to be precise) is not really an intermediate program, it's a state associated with any Linux process.
A container is just namespaces and cgroups. You can still have your mellanox or solarflare zero-copy network stack for a containerised process.
That is, a containerised user space process can directly access the hardware, bypassing the kernel but isolated from other processes.
There are plenty of footguns for sure though but my experience working in HFT has been everyone is pretty elite skill-wise so sharp edges are not an issue in practice.
Now that's an interesting problem to have!
If you trust those tools and don't have untrusted users or untrusted code, you can sometimes just mount /var/run/docker.sock and use the VM/VPS/server's Docker directly. It is actually the approach that was used by excellent tools like Portainer, though it's also really risky as well.
Alternatively, you can try to just run Docker in Docker (DinD), which is a bit more tricky and the opinions there are split about whether to do it and when to do it: https://github.com/jpetazzo/dind
Of course, someone might also jump in and suggest that Docker is architecturally problematic (i don't care much, just want my containers to run, then again; i don't deal with untrusted code or any sort of multitenancy) and you should use Podman or another set of technologies, which is interesting advice but would necessitate other approaches.
In short, like with most technologies: Docker and OCI container in general get more messy as your requirements become more advanced. For the problems that they do solve easily (app packaging), they are pretty good, though!
It's currently working great and I have not had any major crashes/incidents for at least the past 8 months.
If it's advisable is another question, as that gives full control over all other containers (and likely more)
At that point you may want to just run it on the host, but basically you'd better trust whatever it is.
What cases can linux containers not handle? Containers can access GPUs, /dev/kvm, block devices... I'm having trouble thinking of anything they can't do. After all, they're just processes in a glorified chroot, not that different from processes on the linux host.