News for hackers. Stuff that matters.
Re:Containers Are Not the Future by ch_123 on Thursday March 19, 2020 @02:58PM (#22630496)
If we take "Container" to specifically mean OS-level isolation of applications, then there is a strong likelihood that Containers will be replaced by lightweight VMs.

To me, the rise of containers has been about packaging software alongside all its dependencies in a standalone package that is (to varying degrees) isolated from the underlying host. In that sense, lightweight VMs are an evolution of the container model we already use.

The author fails to explain how these lightweight VMs would be orchestrated. Maybe Kubernetes sucks, but if something more secure comes along, is that a failure of the container approach, or is it an evolution?

All in all, this feels like someone writing a post saying "The aircraft created by the Wright Brothers was terrible, therefore powered flight was a failure". That, an attempt to sell something by bashing popular techs and millennial coders.

Re:Containers Are Not the Future by btilly on Thursday March 19, 2020 @04:27PM (#22631357)
The author fails to explain how these lightweight VMs would be orchestrated.

There are two directions that most organizations can go from containers, and they have opposite answers to this question.

The first direction is back to a monolithic application running in a VM. Orchestration no longer exists as a problem. What else do we get? Development is easier. Debugging is easier. We have literally decades of experience figuring out how to make it work.

Very, very few of the people reading this post are solving problems harder than ones I was solving decades ago using that kind of stack. Other than the fact that your resume won't look as good, there is zero reason not to do this.

The other is, as the post's author recommends, even further into isolating the app. Down to something even simpler than a container. In which case you will need a solution for orchestration, but it won't let you leverage a single running VM to a whole cluster. Limiting the attack area will be good for security.

As a bonus things that container folks say work, but don't, will work. For example autoscaling fails in adtech with containers fails hard because the time that it takes to boot up new instances exceeds the time that you are getting flooded by your ad. But if your unikernel boots fast enough, now autoscaling does work.

Now there is a third use case. And that is organizations like Google whose codebase is so big that they can't run it monolithically on a single machine. Containers solve that in a distributed environment by letting them run only some of their code on each machine. There is a hidden cost that RPCs over a network are inherently an order of magnitude more expensive (in time, latency, and resources) than a function call inside of a running application. So you order an order of magnitude more hardware, and containers are the sweet spot for you.

But that problem is of a kind that very few organizations have. And making it actually work takes a lot of thought and organization that very few in the containerization world seem to understand. Certainly if you read a few blog posts, install Docker and Kubernetes, then start deploying through Helm, I am willing to bet large sums of money that you are almost certainly making rookie mistakes.

Re:Containers Are Not the Future by mschuster91 on Thursday March 19, 2020 @05:23PM (#22631892)
> The first direction is back to a monolithic application running in a VM. Orchestration no longer exists as a problem

Of course it does, VMware makes a boatload of money with VM orchestration. Or you setup OpenStack which is free but a nightmare in itself.

You do not want a hand-rolled KVM virtualization stack. I've been there, I've seen the horrors.

Re:Containers Are Not the Future by btilly on Thursday March 19, 2020 @05:50PM (#22632126)
In 2003 I was a developer on a website that served a million pages per hour using 2 databases, 4 webservers, and associated networking. Most of that hardware was there for automated failover.

At that scale, orchestration is simply not a challenge. We wrote a deployment script to roll out code changes and life was good.

2020 hardware is not worse than 2004 hardware. And while that business eventually failed, it was not due to technology. (And it made a lot of money before it failed.) As I said, most here are not doing something harder now than we did then. The same class of solution works.

As the old saying goes, KISS. Know when it works, and when it doesn't. As another saying says, YAGNIY. (You Ain't Gonna Need It Yet.) Deal with the limits of being monolithic after you encounter them. Don't complicate your life to tackle problems that don't exist.

Re:Containers Are Not the Future by mschuster91 on Thursday March 19, 2020 @05:56PM (#22632182)
> In 2003 I was a developer on a website that served a million pages per hour using 2 databases, 4 webservers, and associated networking. Most of that hardware was there for automated failover.

fwiw, Stackoverflow runs on a similarly sized/deployed stack.

But that is because Stackoverflow is fine with their employees running a cheap, un-complex system that works (I can't remember the last SO outage!), and their employees are also happy with this.

Others, especially startups? Gotta chase these hipster credentials and use the free AWS/Azure/GCP credits somehow... and the employees don't want boring old school stuff, they want the newest hipster crap that's barely alpha tested, but in production. Utterly ridiculous. Most of them would be fine with three sub-$10k AMD servers and a bit of work by a seasoned Linux sys-admin. But eww. Linux management. Not cool/hip.

Re:Containers Are Not the Future by btilly on Thursday March 19, 2020 @06:07PM (#22632261)
But that is because Stackoverflow is fine with their employees running a cheap, un-complex system that works (I can't remember the last SO outage!), and their employees are also happy with this.

Great example!

Far too often we introduce complexity to manage complexity. Then we fail to manage the complexity that we created, and conclude that we need even more complexity!

Taking the simple approach seems impossible and utterly scary. But it works more often than most would believe.

Re:Containers Are Not the Future by heavenlyblue on Thursday March 19, 2020 @06:06PM (#22632251)
Did that stack include daily traffic analytics hardware?
Re:Containers Are Not the Future by btilly on Thursday March 19, 2020 @06:33PM (#22632460)
See https://nickcraver.com/blog/2016/02/17/stack-overflow-the-ar... for an overview of their stack.

They do NOT need a stack of daily traffic analytics hardware. As I said above, remote RPCs take an order of magnitude more resources than function calls. If you are used to using various distributed tools to do analytics, you are used to requiring an order of magnitude more hardware than a simpler solution. And if there are inefficiencies in your solution, it is easy for a second order of magnitude to sneak in. Therefore your experience is going to seriously mislead you about the likely limits of a simpler solution.

Making this concrete, if your job requires a Hadoop cluster of less than 50 machines, odds are good that it could be run just fine on a single machine with a different technology choice. But if you are fully utilizing hundreds of machines in your cluster, then you actually need to be distributed. (Though you could achieve considerable savings for some of your jobs could be run in a more efficient architecture. Amazon in particular makes excellent use of this kind of hybrid architecture in places.)

Google is making excellent decisions for the scale that they operate on. You just are unlikely to operate at a scale that makes their decisions make much sense for you.

Re:Containers Are Not the Future by mschuster91 on Thursday March 19, 2020 @08:25PM (#22633269)
For what the hell do you need traffic analytics beyond parsing access logs? Current ad-tech/analytics is a mixture of outright fraud, fraud sold as "AI", fraud sold as "big data", middlemen claiming to solve said fraud, and privacy invasions on a scale that would make the Stasi drool.

Stackoverflow doesn't need this kind of shit and frankly, no one else does. The GDPR was a first start in the right direction and I'm seriously hoping coronavirus has at least one positive side and eliminates those fraudsters who survived the GDPR wave.

Re:Containers Are Not the Future by manigandham on Tuesday March 24, 2020 @03:51AM (#22672889)
Stackoverflow logs every request into SQL Server which uses columnstore tables to handle all their analytics. It's fast, efficient and more than enough.
Re:Containers Are Not the Future by castillar76 on Thursday March 19, 2020 @06:35PM (#22632482)
As someone said, "Scale is the problem (almost) everyone wants and (almost) no one has." Technologies like Kubernetes were developed from managing monster-sized applications like Facebook, Amazon, and Google. Devs really want to play with the cool tech, but unless they work for a FAANG company, the odds are good that not only do they not have those problems now, they will never have those problems.

That's not to say that things like containers are useless. I've seen a lot of benefits from developers working on containerization because it forces them to think about making their code reproducible and automating their development and delivery models. That has huge benefits from a security perspective, even if the end result is that you take the artifacts produced and rsync them onto a remote VM in the datacenter and restart services. There's lots of good to be gained there—I just wish people would quit trying to forklift everything into containers (and thence into the cloud) when they don't have to.

Re:Containers Are Not the Future by mschuster91 on Friday March 20, 2020 @02:28PM (#22640084)
There do exist things that make it sense for even small shops putting their stuff into containers and then small-ish local/bare metal or even cloud k8s environments:

1) automatic restarts of services when they fail: yes, this is possible with systemd but it's a nightmare to set up compared to a simple HEALTHCHECK command in Docker or an appropriate config section in k8s/rancher.

2) dependency chains (e.g. a java app that depends on mysql database and an external elasticsearch): again, this is possible with systemd, but way easier in k8s.

3) hardware/OS maintenance: in ye olde days, the admin would have to manually shut down services, copy data to new servers, start services there and then pray everything would work to prepare for a large-ish OS update or a longer hardware maintenance without having too much downtime (or buy more expensive software versions such as JIRA/Confluence DC). With k8s/rancher, assuming shared NFS storage, it's as easy as draining and cordoning the node, minimal downtime (essentially the time the software needs to stop/start) and no network/firewall/LB surprises along the way.

4) related to 3), in the cloud, assuming that services have horizontal scalability in mind (which most popular PHP environments have), it's relatively easy and straightforward to use autoscaling to save costs on one side but also prevent your site from going belly-up in case of HN/Reddit mentions. With manual deployments? Ouch.

5) Software upgrades or the creation of stage environments are so much easier, assuming well-written Docker images and software. Again let's take JIRA and Confluence - manually installed it's a lot of fumbling around to upgrade an instance, but with Docker? As easy as incrementing the version tag in the k8s config and 5min later it's updated.

Re:Containers Are Not the Future by eyberg on Thursday March 19, 2020 @05:35PM (#22632003)
I'd agree with all the points you just made. I'd also offer that if one is using public cloud than a lot of the orchestration is already taken care of for you.
Re:Containers Are Not the Future by wvh on Thursday March 19, 2020 @07:13PM (#22632775)
I mostly agree – which probably betrays my age – though when the load exceeds one server, you're going to have to orchestrate no matter what: deployment, load balancing, fail-over, system updates. While I'm critical of Kubernetes' complexity, I still think that for some people, having that orchestration handled by a tested layer instead of implementing it from scratch in-house is still going to be a benefit.

After working with and securing large bare-metal and monolithic virtual host environments for way too long, there's got to be a better way to deploy services and update systems than the snowflake hell some monolithic approaches seem to bring.

Perhaps there's a middle way between both worlds that has yet to gain any momentum.

Re:Containers Are Not the Future by wmf on Thursday March 19, 2020 @03:19PM (#22630676)
Yeah, if you look at how lightweight VMs are being used, they're being used to run containers, not unikernels.
Re:Containers Are Not the Future by eyberg on Thursday March 19, 2020 @03:05PM (#22630554)
For orchestration:

Someone else mentioned this in a different comment, but there was very much a link to firecracker in the article.

That - and all the other many tools that you would deploy vms to the public cloud today of which there are numerous production quality options out there.

Lastly, this is precisely the point I was trying to address with the "I'm honestly curious - what are the alternatives?" paragraph.

Re:Containers Are Not the Future by wmf on Thursday March 19, 2020 @03:45PM (#22630902)
You could say Lambda is the orchestration layer for Firecracker but it's based on the serverless/FaaS model that's a lot more restrictive than containers.
Re:Containers Are Not the Future by eyberg on Thursday March 19, 2020 @03:56PM (#22631015)
Oh - I'm not saying that Lambda is what I'd personally choose, although there definitely seems to be quite a few people that do like it.

As mentioned in the article - the base unit of compute on public cloud is the virtual machine so there are quite a few tools out there to deploy those. Some microvm implementations out there won't boot straight off AWS/GCE but many including Nanos do. It takes ~2min to deploy && boot most applications we are running on GCE - AWS is a bit longer (but I could see that changing in the future). Note - in this case you are actually uploading the entire image - if you are just spinning up/down than it's much much faster.

Re:Containers Are Not the Future by wmf on Thursday March 19, 2020 @04:35PM (#22631449)
Yeah, I guess it depends on your goals. Some of the unikernel people talk about VMs even smaller/cheaper than a t3.nano that start faster than any cloud can start a VM. Clearly to run such a thing you would need your own orchestration layer. Maybe that's a niche within a niche though.
Re:Containers Are Not the Future by eyberg on Thursday March 19, 2020 @04:48PM (#22631571)
Agreed.

I think for our general use case we are looking at people with needs that are using vms or containers today (eg: not necessarily those that want plaid speed boot-times). That's not really something we are currently optimizing for. For something like a database there would be no desire to spin up/down so fast. Also, many frameworks with heavy language vms such as JVM or ruby take a long time to boot regardless so trying to run those in a 5-10ms boot-time doesn't make a ton of sense.

Having said that, there most definitely are very very interesting projects like LightVM, http://cnp.neclab.eu/projects/lightvm/ that do target low latency and NFV would be a great use-case for projects like that.

Re:Containers Are Not the Future by kortilla on Thursday March 19, 2020 @05:11PM (#22631784)
> packaging software alongside all its dependencies in a standalone package that is (to varying degrees) isolated from the underlying host

You mean like vmdk or qcow2 images did for nearly a decade before containers rose?

Re:Containers Are Not the Future by dharmab on Thursday March 19, 2020 @05:39PM (#22632042)
Check out Kata Containers if you're interested in QEMU with a container interface.
Re:Containers Are Not the Future by eeZah7Ux on Thursday March 19, 2020 @03:47PM (#22630924)
> packaging software alongside all its dependencies

That's why containers are a security disaster.

And they also make it impossible to do system administration with reasonable resources.

Re:Containers Are Not the Future by ecnahc515 on Thursday March 19, 2020 @04:17PM (#22631248)
No more a disaster than managing multiple VMs that have their own set of installed packages that you need to securely update regularly.