docs/daemon
Michael Crosby b4e2f5ed96 Move userland proxies out of daemon's process
This PR moves the userland proxies for TCP and UDP traffic out of the
main docker daemon's process ( from goroutines per proxy ) to be a
separate reexec of the docker binary.  This reduces the cpu and memory
needed by the daemon and if the proxy processes crash for some reason
the daemon is unaffected.  This also displays in the standard process
tree so that a user can clearly see if there is a userland proxy that is
bound to a certain ip and port.

```bash
CONTAINER ID        IMAGE                       COMMAND             CREATED             STATUS              PORTS                                          NAMES
5d349506feb6        busybox:buildroot-2014.02   "sh"                13 minutes ago      Up 1 seconds        0.0.0.0:49153->81/tcp, 0.0.0.0:49154->90/tcp   hungry_pike
root@1cbfdcedc5a7:/go/src/github.com/docker/docker# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1  18168  3100 ?        Ss   21:09   0:00 bash
root      8328  0.7  0.6 329072 13420 ?        Sl   22:03   0:00 docker -d -s vfs
root      8373  1.0  0.5 196500 10548 ?        Sl   22:03   0:00 userland-proxy -proto tcp -host-ip 0.0.0.0 -host-port 49153 -container-ip 10.0.0.2 -container-port 81
root      8382  1.0  0.5 270232 10576 ?        Sl   22:03   0:00 userland-proxy -proto tcp -host-ip 0.0.0.0 -host-port 49154 -container-ip 10.0.0.2 -container-port 90
root      8385  1.2  0.0   3168   184 pts/0    Ss+  22:03   0:00 sh
root      8408  0.0  0.1  15568  2112 ?        R+   22:03   0:00 ps aux
```

This also helps us to cleanly cleanup the proxy processes by stopping
these commands instead of trying to terminate a goroutine.

Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-13 11:54:47 -07:00
..
execdriver Fix go vet warnings 2014-08-13 11:37:30 +04:00
graphdriver Replace "amd64" build tags with "cgo" as appropriate, and remove where unnecessary 2014-08-06 17:20:21 -06:00
networkdriver Move userland proxies out of daemon's process 2014-08-13 11:54:47 -07:00
MAINTAINERS Add maintainers to daemon/ and graph/ 2014-08-06 10:29:15 +00:00
README.md Add readme for daemon directory 2014-05-17 17:56:02 +00:00
attach.go port usage of jsonlog to the new daemon files which were refactored 2014-08-06 16:45:04 -07:00
build.go Move "build" to daemon/build.go 2014-08-13 03:12:33 +00:00
changes.go Move "changes" to daemon/changes.go 2014-08-01 14:24:46 -04:00
commit.go Move "commit" to daemon/commit.go 2014-08-01 14:17:24 -04:00
container.go fix goroutines leak and exit code 2014-08-13 00:03:56 +00:00
container_unit_test.go Added test cases for no port passed to nat.ParsePortSpecs and negative port number passed 2014-08-01 23:41:34 +05:30
copy.go Move "copy" to daemon/copy.go 2014-08-01 14:24:41 -04:00
create.go Separate events subsystem 2014-08-06 10:08:19 +00:00
daemon.go Remove deprecated server/ package 2014-08-13 06:56:45 +00:00
daemon_aufs.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
daemon_btrfs.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
daemon_devicemapper.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
daemon_no_aufs.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
delete.go fix #7374 leftover 2014-08-12 23:37:33 +00:00
export.go Separate events subsystem 2014-08-06 10:08:19 +00:00
history.go don't call sort for every add in history 2014-05-14 15:02:02 +03:00
image_delete.go Rename "log_event" to "log" 2014-08-06 10:08:23 +00:00
info.go Move "info" to daemon/info.go 2014-08-08 03:01:55 +00:00
inspect.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
kill.go Separate events subsystem 2014-08-06 10:08:19 +00:00
list.go Move "containers" to daemon/list.go 2014-08-01 14:24:58 -04:00
logs.go Fix go vet warnings 2014-08-13 11:37:30 +04:00
network_settings.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
pause.go Separate events subsystem 2014-08-06 10:08:19 +00:00
resize.go Move "resize" to daemon/resize.go 2014-08-01 14:17:20 -04:00
restart.go Separate events subsystem 2014-08-06 10:08:19 +00:00
start.go Separate events subsystem 2014-08-06 10:08:19 +00:00
state.go fix goroutines leak and exit code 2014-08-13 00:03:56 +00:00
state_test.go Fix go vet warnings 2014-08-13 11:37:30 +04:00
stop.go Separate events subsystem 2014-08-06 10:08:19 +00:00
top.go Move "top" to daemon/top.go 2014-08-01 14:24:52 -04:00
utils.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
utils_linux.go Fix cross compile non cgo and linux systems 2014-07-16 16:57:49 -07:00
utils_nolinux.go Fix cross compile non cgo and linux systems 2014-07-16 16:57:49 -07:00
utils_test.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
volumes.go Cleanup: extract bindmount spec parsing 2014-08-06 17:22:40 -04:00
wait.go Move "wait" to daemon/wait.go 2014-08-01 14:17:16 -04:00

README.md

This directory contains code pertaining to running containers and storing images

Code pertaining to running containers:

  • execdriver
  • networkdriver

Code pertaining to storing images:

  • graphdriver