onyx 2018-06-12

on that note, do people run the aeron driver in a separate docker container, or on a different process within the same container ?

https://github.com/onyx-platform/onyx-template/tree/0.13.x/src/leiningen/new/onyx_app runs it as a separate process within the same container, but i am not sure whether that's the best practice.. ?

we run it in the same container, i’ve tried running it in a separate container but ran into issues

i don’t remember the specifics though

@lmergen separate process in the same container, using https://github.com/just-containers/s6-overlay

👍 2

@mccraigmccraig first time i'm seeing s6, looks great!

from the comments in my onyx peer Dockerfile it was originally from @gardnervickers ... i'm guessing there is an onyx example Dockerfile somewhere ?

I have done it both ways, in the same container and a separate container in a pod

It’s recommended that you run a single process per docker container. For the Peer/MediaDriver case, you want to setup communication over shared memory (`/dev/shm`).

S6 is just a process monitor from what I recall to make sure child processes are correctly reaped.

Back when those scripts were created it wasn’t easy/possible to spawn two containers with shared memory between them but now the examples would be much better served by using /dev/shm on the host and mounting it in two separate containers.

so that would probably mean creating a tmpfs volume in docker and sharing it between multiple containers ?

(that's what i was thinking about)

and mounting it to /dev/shm

Yea that would be even better

because that would also get rid of the whole --shm_size issue afaict

Exactly simple_smile

It also more directly maps to docker orchestrator abstractions like Kubernetes "Memory" volumes

what about performance ? i assume it doesn't suffer ?

intuitively you would think there's a performance hit, but i can't think of any

If any I doubt it’s enough to notice

i just read on the docs that you cannot share a tmpfs volume between docker containers

Alright yea then just mounting the hosts /dev/shm should be fine