Cool nginx playground by b0rk (Julia Evans)
Posted by jpluimers on 2024/08/28
This is a really cool interactive [Wayback/Archive] nginx playground!
It starts with a default nginx configuration which you can edit and spins up a docker container for each run showing the results of that configuration.
How cool is that to learn how nginx works (:
This is how I found out about it:
- [Wayback/Archive] ShanerBaner on Twitter: “After reading
jvns.ca/blog/2022/06/28/some-notes-on-bubblewrapI wondered: “Why does it take 400ms to run ls in docker?” I don’t know the answer yet, but I’ve found a few clues in dockerd/containerd/runc. Depending on your config you can get anywhere from 40ms->400ms.”
- [Wayback/Archive] ShanerBaner on Twitter: “
runc, when using theconfig.jsonused bydocker, initially took about 80ms. Removingepbfforseccompfiltering saved 20ms. Another 20ms were saved by stripping down themounts/namespaces/ptys.”- [Wayback/Archive] opencontainers/runc: CLI tool for spawning and running containers according to the OCI specification
- [Wayback/Archive] Use the Docker command line: configuration files | Docker Documentation
- eBPF: enhanced Berkeley Packet Filter (Berkeley Packet Filter – Wikipedia)
- seccomp – Wikipedia
- pty: Pseudoterminal – Wikipedia
- [Wayback/Archive] ShanerBaner on Twitter: “I got stuck at 40ms because `
perf` can’t seem to find all of the debugging symbols for myruncbinary. But even that singleruncinvocation involvesruncforking itself a couple times.” - [Wayback/Archive] Aleksa Sarai 暗号伯爵 on Twitter: “@shanemhansen The forking happens because of restrictions placed on us by the Go runtime (Go does not have a bare “fork” primitive and you cannot disable multi-threadedness from within a Go program — creating a container usually only takes one or two forks but we need three and an exec).”
- [Wayback/Archive] Aleksa Sarai 暗号伯爵 on Twitter: “@shanemhansen We need the
execso we can run the embedded C code we have which executes all of the stuff that we cannot do from within Go. Personally I think the fact we need to do this at all discounts the argument that Go is a “systems programming language”.”
- [Wayback/Archive] ShanerBaner on Twitter: “
- [Wayback/Archive] Notes on running containers with bubblewrap
- [Wayback/Archive] New tool: an nginx playground (which is not dated, but I think it went life in fall 2021)
–jeroen







Leave a comment