Live data from Hacker News

Microcontainers – Tiny, Portable Docker Containers

iron.io

1–10 of 68 posts

Re: Microcontainers – Tiny, Portable Docker Containers

#2
This seems to solve one of my biggest issues with trying to use individual Dockers to run microservices.

Past experiments proved that it wasn't feasible to match one microservice request to one Docker instance. The size of each Docker required vertical scaling of the microservices per container, which was not ideal.

Good job Iron.io! Might trying playing with these at some point.

Re: Microcontainers – Tiny, Portable Docker Containers

#3
Do we really need to brand using smaller containers as microcontainers? Why not submit these as pull requests to the official docker images rather than introducing more fragmentation?

Also worth noting that the official docker images are moving towards alpine. Of course if you have ruby or node apps your biggest space hog is still going to be your packages.

Re: Microcontainers – Tiny, Portable Docker Containers

#4
post #2

This seems to solve one of my biggest issues with trying to use individual Dockers to run microservices. Past experiments proved that it wasn't feasible to match one microservice request to one Docker instance. The size of each Docker required vertical scaling of the microservices per container, which was not ideal. Good job Iron.io! Might trying playing with these at some point.

... Why? The scalability difference (in terms of disk space) between having multiple services per container and many containers is, in practice, zero.

That's because of layered filesystems and most of the language runtimes and other images pulling from a small set of base images.

For example, if you have two node applications, the base "nodejs" image is 633MB in size. If both of your applications have "FROM node" at the top and proceed to add different applications (say 2MB each), you'll find the "node" portion is totally shared and only the diff, you copying in your application's files, is different. You'll only store a single copy of the 633MB node image + your two application image's diffs, for a total of 637MB.

That number is the same if you bundle the applications (vertically scale as you say it).

This is also sorta true across language runtimes too! With some creative diffing, I experimentally tested the difference between the ruby and nodejs images. It turns out there's just under 600MB in common. The ruby image has 116MB of data the node one doesn't, and the node one has ~40MB of data the ruby one doesn't.

Again, you'll end up using a very small amount of disk space.

These savings also apply to downloading images after the initial base layers are downloaded (e.g. docker pull ruby; docker pull node will only download roughly 750MB of data, even though that's two >600MB images).

In any case, it's strange that disk space on the order of a couple gigs is even a scaling concern at all; I'd imagine memory or your application's disk needs would far outweigh such concerns.

My main point, however, is that your discussion of one service per container vs multiple services per container being any different in terms of disk space is rubbish and utterly false.

Re: Microcontainers – Tiny, Portable Docker Containers

#5
post #3

Do we really need to brand using smaller containers as microcontainers? Why not submit these as pull requests to the official docker images rather than introducing more fragmentation? Also worth noting that the official docker images are moving towards alpine. Of course if you have ruby or node apps your biggest space hog is still going to be your packages.

There's also a very good reason to not move some things to alpine, including ruby and node applications. A significant number of ruby and nodejs apps depend on some c/c++ code hidden away in this module or that gem. Any time you're compiling c/c++ code, you run into a chance of musl vs libc causing differences.

These differences can range from building requiring different options to the application having strange performance characteristics to random crashes (rare!).

In addition, people who write these modules typically test against an ubuntu or debian system, so those are much safer bets. Alpine makes no serious attempt to match packages with those, either in breadth nor version.

It really isn't feasible to unilaterally move people, and for compatibility reasons Docker does not often change tags in such a drastic way.

The official docker images are often offering alpine alternatives in different tags, which is not the same as "moving towards" as you remarked.

Re: Microcontainers – Tiny, Portable Docker Containers

#7
post #5
post #3

Do we really need to brand using smaller containers as microcontainers? Why not submit these as pull requests to the official docker images rather than introducing more fragmentation? Also worth noting that the official docker images are moving towards alpine. Of course if you have ruby or node apps your biggest space hog is still going to be your packages.

There's also a very good reason to not move some things to alpine, including ruby and node applications. A significant number of ruby and nodejs apps depend on some c/c++ code hidden away in this module or that gem. Any time you're compiling c/c++ code, you run into a chance of musl vs libc causing differences. These differences can range from building requiring different options to the application having strange per…

We are in fact moving towards alpine, but can't just switch the default tags overnight in case some users depend on the properties of certain distros.

Re: Microcontainers – Tiny, Portable Docker Containers

#8
post #4
post #2

This seems to solve one of my biggest issues with trying to use individual Dockers to run microservices. Past experiments proved that it wasn't feasible to match one microservice request to one Docker instance. The size of each Docker required vertical scaling of the microservices per container, which was not ideal. Good job Iron.io! Might trying playing with these at some point.

... Why? The scalability difference (in terms of disk space) between having multiple services per container and many containers is, in practice, zero. That's because of layered filesystems and most of the language runtimes and other images pulling from a small set of base images. For example, if you have two node applications, the base "nodejs" image is 633MB in size. If both of your applications have "FROM node" at…

I would assume the smaller images would also result in a smaller memory footprint for running the images and a general reduction in time of starting images. You seem to know a lot of about Docker, is that a wrong assumption?

The scale which I'm discussing is in the order of at least several hundred docker images per second. Previous attempts at making this work involved keep a warm elastic pool of Dockers. I'm working with at least 11 environments, ( which all have separate dependency requirements ).

Instead of trying to manage a very large pool of Dockers, I opted for a smaller pool with several larger servers to scale the microservices vertically ( using tools like chroot to help try to isolate each service per silo ).

My main issue with using Docker for this was the bulk of the containers. Startup time, RAM consumption, and the size of the images were all causing me issues.

Re: Microcontainers – Tiny, Portable Docker Containers

#9
post #7
post #5

Earlier quoted context omitted.

There's also a very good reason to not move some things to alpine, including ruby and node applications. A significant number of ruby and nodejs apps depend on some c/c++ code hidden away in this module or that gem. Any time you're compiling c/c++ code, you run into a chance of musl vs libc causing differences. These differences can range from building requiring different options to the application having strange per…

We are in fact moving towards alpine, but can't just switch the default tags overnight in case some users depend on the properties of certain distros.

excited to see recently added support[1] of dns search domains in musl (and therefore Alpine).

[1] http://git.musl-libc.org/cgit/musl/commit/?id=3d6e2e477ced37...

Post reply on HN