News for hackers. Stuff that matters.
Re:Containers vs. Zones vs. Jails vs. VMs by meddlepal on Wednesday March 29, 2017 @12:49AM (#13983499)
Everyone says containers help resource utilization but I think there killer raison d'etre is that they are a common static binary packaging mechanism. I can ship Java, Go, Python, or whatever and the download and run mechanism is all abstracted away.
Re:Containers vs. Zones vs. Jails vs. VMs by dreamcompiler on Wednesday March 29, 2017 @01:14AM (#13983610)
Does this mean we're admitting defeat with shared libraries and we're going back to static libraries again?
Re:Containers vs. Zones vs. Jails vs. VMs by cobookman on Wednesday March 29, 2017 @02:52AM (#13983991)
Disk space is cheap. And we've got multi CPU core servers.

So now we have the issue that you have lots of applications running on the same server, and how do we make sure the right version of some shared lib is on there. And that we won't break another program by updating it.

Containers solve that. No more worrying if that java 8 upgrade will break some old application.

So now every application stack is a static application.

Re:Containers vs. Zones vs. Jails vs. VMs by arianvanp on Wednesday March 29, 2017 @03:16AM (#13984085)
Isn't just about disk space though. It also allows you to quickly make API compatible vulnerability fixes without a rebuild of your application.
Re:Containers vs. Zones vs. Jails vs. VMs by sagichmal on Wednesday March 29, 2017 @05:02AM (#13984476)
This isn't a virtue. Containers solve problems in automated continuous-deployment environments where rebuilding and deploying your fleet of cattle is one click away. In the best case, no single container is alive for more than O(hours). Static linking solves way more operational problems than the loss of dynamic linking introduces, security or otherwise.
Re:Containers vs. Zones vs. Jails vs. VMs by josteink on Wednesday March 29, 2017 @08:30AM (#13985371)
> This isn't a virtue. Containers solve problems in automated continuous-deployment environments where rebuilding and deploying your fleet of cattle is one click away.

This has literally zero to do with containers and everything to do with an automated deployment pipeline.

As a quick FYI: Those are not unique to containers.

Re:Containers vs. Zones vs. Jails vs. VMs by eeZah7Ux on Wednesday March 29, 2017 @06:27AM (#13984804)
> rebuilding and deploying your fleet

...this applies only software developed and run internally, which is a small fraction of all the software running in the world.

Re:Containers vs. Zones vs. Jails vs. VMs by _jal on Wednesday March 29, 2017 @11:02AM (#13986896)
I agree that moving towards static linking, on balance, seems like a a reasonable tradeoff at this point, but it is hardly as cut and dried as a lot of people seem to think.

As one very minor point, it turns vulnerability tracking in to an accounting exercise, which sounds like a good idea until you take a look at the dexterity with which most engineering firms manage their AWS accounts. (Sure, just get better at it and it won't be a problem. That advice works with everything else, right?)

One's choice of deployment tools may slap a bandaid on some things, but that is not the same thing as solving a problem; that is automated bandaid application.

And odd pronouncements like any given container shouldn't be long lived are... odd. I guess if all you do is serve CRUD queries with them, that's probably OK.

As a final point, I feel like the container advocates are selling an engineer's view of how ops should work. As with most things, neutral to good ideas end up wrapped up with a lot of rookie mistakes, not to mention typical engineer arrogance[1]. Just the same thing you get anywhere amateurs lecture the pros, but the current hype train surrounding docker is enough to let it actually cause problems[2].

My takeaway is still the same as it was when the noise started. Docker has the potential to be a nice bundling of Linux capabilities as an evolution of a very old idea that solves some real problems in some situations, and I look forward to it growing up. In the mean time, I'm bored with this engineering fad; can we get on with the next one already?

[1] One very simple example, because I know someone will ask: Kubernetes logging is a stupid mess that doesn't play well with... well, anything. And to be fair, ops engineers are no better with the arrogance.

[2] Problems like there being not even a single clearly production-ready host platform out of the box. Centos? Not yet. Ubuntu? Best of the bunch, but still hacky and buggy. CoreOS? I thought one of the points was a unified platform for dev and prod.

Re:Containers vs. Zones vs. Jails vs. VMs by MichaelMoser123 on Wednesday March 29, 2017 @06:24AM (#13984790)
Linking with static libraries takes more time (poor programmer has to wait longer on average while it is linking), also when it crashes you see from the backtrace or from ldd which version of Foo is involved.
Re:Containers vs. Zones vs. Jails vs. VMs by mook on Wednesday March 29, 2017 @01:31AM (#13983701)
Mostly, yes. Notice that Go and Rust (two of the newer languages popular at least on HN) also feature static compilation by default. Turns out that shared libraries are awesome, until the libraries can't provide a consistently backwards compatible ABI.
Re:Containers vs. Zones vs. Jails vs. VMs by zuzun on Wednesday March 29, 2017 @04:28AM (#13984357)
Go has no versioning, in Rust everything is version 0.1... then one day you update that serialization library from 0.1.4 to 0.1.5 and all hell breaks loose because you didn't notice they changed their data format internally and now your new process can't communicate with the old ones and your integration test missed that because it was running all tests with the new version on your machine. This makes you implement the policy "Only rebuild and ship the full stack" and there you are, scp'ing 1GB of binaries to your server because libleftpad just got updated.
Re:Containers vs. Zones vs. Jails vs. VMs by michaelmrose on Wednesday March 29, 2017 @05:53AM (#13984654)
Except outside of Javascript nobody on earth makes libleftpad and whose binaries are 1gb?
Re:Containers vs. Zones vs. Jails vs. VMs by qznc on Wednesday March 29, 2017 @01:09PM (#13988383)
In D it is part of the standard library. ;)

https://dlang.org/library/std/range/pad_left.html

Re:Containers vs. Zones vs. Jails vs. VMs by michaelmrose on Wednesday March 29, 2017 @05:49AM (#13984640)
Except outside of Javascript nobody on earth makes libleftpad
Re:Containers vs. Zones vs. Jails vs. VMs by DaiPlusPlus on Wednesday March 29, 2017 @02:31AM (#13983917)
Static libraries can't be replaced/updated post-deployment - you need to rebuild, whereas, shared libraries in a container can be - which is useful if you're working with dependencies that are updated regularly (in a non-breaking fashion) or proprietary binary blobs.
Re:Containers vs. Zones vs. Jails vs. VMs by sagichmal on Wednesday March 29, 2017 @05:03AM (#13984481)
> Static libraries can't be replaced/updated post-deployment

And that's great news. Immutable deployment artifacts let us reason about our systems much more coherently.

Re:Containers vs. Zones vs. Jails vs. VMs by empthought on Wednesday March 29, 2017 @07:26AM (#13985048)
No, they prevent an entire class of reasoning from needing to take place. It is still possible to reason coherently in the face of mutable systems, and people still "reason" incoherently about immutable ones.
Re:Containers vs. Zones vs. Jails vs. VMs by dkersten on Wednesday March 29, 2017 @03:10AM (#13984064)
Is rebuilding and redeploying a container really any different from rebuilding and redeploying statically linked binaries?
Re:Containers vs. Zones vs. Jails vs. VMs by steinnes on Wednesday March 29, 2017 @09:06AM (#13985748)
For a lot of applications: no, it's very similar, and if you have a language that can be easily statically compiled to a binary which is free of external dependencies and independently testable, and you've setup a build-test-deployment pipeline relying on that, then perhaps in your case containers are a solution in search of a problem :-)

But there are more benefits like Jessie touches upon in her blog post, wrt flexibility and patterns you can use with multiple containers sharing some namespaces, etc. And from the perspective of languages that do not compile to a native binary the containers offer a uniform way to package and deploy an application.

When I was at QuizUp and we decided to switch our deployment units to docker containers we had been deploying using custom-baked VM's (AMI's). When we first started doing that it was due to our immutable infrastructure philosophy, but soon it became a relied-upon and necessary abstraction to homogeneously deploy services whether they were written in python, java, scala, go, or c++.

Using docker containers allowed us to keep that level of abstraction while reducing overheads significantly, and due to the dockers being easy to start and run anywhere we became more infrastructure agnostic at the same time.

Re:Containers vs. Zones vs. Jails vs. VMs by DaiPlusPlus on Wednesday March 29, 2017 @05:39AM (#13984606)
Not everyone has container source code - or it might be impractical. If you run RabbitMQ in your container would you want to build that from source as part of your build process?
Re:Containers vs. Zones vs. Jails vs. VMs by floatboth on Wednesday March 29, 2017 @08:34AM (#13985405)
"Container source code" is usually something like "run pkg-manager install rabbitmq" though.
Re:Containers vs. Zones vs. Jails vs. VMs by amenghra on Wednesday March 29, 2017 @02:58AM (#13984014)
It would be nice to have a third option when building binaries: some kind of tar/jar/zip archive with all the dependencies inside. It would give the pros of static and shared libraries without everything else containers imply. The OS could the be smart enough to only load identical libraries once.
Re:Containers vs. Zones vs. Jails vs. VMs by ori_b on Wednesday March 29, 2017 @03:05AM (#13984042)
That's equivalent to static linking, but with extra runtime overhead. You can already efficiently ship updates to binaries with something like bsdiff or cougrette, so the only reason to bundle shared libraries in an archive is for LGPL license compliance, or for poorly thought out code that wants to dlopen() itself.
Re:Containers vs. Zones vs. Jails vs. VMs by amenghra on Wednesday March 29, 2017 @01:58PM (#13988887)
Upgrading a library that has been statically linked isn't as nice as a shared lib + afaik the OS doesn't reuse memory for static libs.
Re:Containers vs. Zones vs. Jails vs. VMs by justincormack on Wednesday March 29, 2017 @03:37AM (#13984168)
A container image is a tarball of the dependencies.
Re:Containers vs. Zones vs. Jails vs. VMs by amenghra on Wednesday March 29, 2017 @01:58PM (#13988892)
Yes, but containers also provide more stuff that I might not want to deal with.
Re:Containers vs. Zones vs. Jails vs. VMs by ianburrell on Wednesday March 29, 2017 @02:33PM (#13989210)
The OS can be smart enough to load identical libraries once. But it requires them to be the same file. This can be achieved with Docker image layers and sharing the same base layer between images. It could also be achieved with content-addressable store that deduplicated files across different images. This would be helped by container packaging system that used the same files across images.

Page sharing can also depend on the storage driver; overlayfs support page cache sharing and brtfs does not.

Re:Containers vs. Zones vs. Jails vs. VMs by Longhanks on Wednesday March 29, 2017 @03:04AM (#13984036)
That's basically what OS X does with bundles.
Re:Containers vs. Zones vs. Jails vs. VMs by dkersten on Wednesday March 29, 2017 @03:11AM (#13984068)
jars already support this.
Re:Containers vs. Zones vs. Jails vs. VMs by amenghra on Wednesday March 29, 2017 @02:00PM (#13988907)
yes, I think we should have the same capabilities in a language agnostic way.

Signed jars are a little painful to use (you can't easily bundle them), but that's a minor issue.

Re:Containers vs. Zones vs. Jails vs. VMs by ori_b on Wednesday March 29, 2017 @03:06AM (#13984047)
This is why something like 25% of containers in the docker registry ship with known vulnerabilities.
Re:Containers vs. Zones vs. Jails vs. VMs by wmf on Wednesday March 29, 2017 @01:15AM (#13983616)
Or you could have done the same thing years earlier with AMIs?
Re:Containers vs. Zones vs. Jails vs. VMs by tannhaeuser on Wednesday March 29, 2017 @03:03AM (#13984033)
But AMIs are full VM images as opposed to container images, aren't they?
Re:Containers vs. Zones vs. Jails vs. VMs by wmf on Wednesday March 29, 2017 @02:15PM (#13989035)
Most Docker images also contain a full OS.
Re:Containers vs. Zones vs. Jails vs. VMs by cookiecaper on Tuesday April 11, 2017 @12:37PM (#14089754)
Yes, everyone overlooks this and talks about how Docker containers are "app-only images" or something. They're not app-only. They may be using a thin OS like Alpine, but there's still a completely independent userspace layer. The only thing imported from the host is the kernel. If you made VM images in the same way, they'd also be 200M.

The benefit of "containers" is that you don't need to siphon off a dedicated section of RAM to the application.