4 ms·
The industry is certainly moving towards less and less stuff included by default in a production environment. What used to be a full install of Debian with you
by jrockway 7y ago
The industry is certainly moving towards less and less stuff included by default in a production environment. What used to be a full install of Debian with your app checked out in /var/www is now a Docker container containing only the packages you need. The even more careful people don't even use Debian, they use a stripped down distribution like Alpine. The even more careful people don't have a distribution, they just have their application and the one or two support files it needs (ca-certs usually). It is intriguing to apply this approach to OS features itself, because less dependence on the OS means that more of the kernel can be safely shared. And, of course, there is less surprise at something that is enabled by default that you don't need. (I feel like 99% of security is disabling stupid things that are on by default. With Linux, you never know if you got them all.)
Being able to share the kernel safely means potentially better utilization. (The progression is dedicated machines -> hypervisor-based VMs -> multiple customers sharing the Linux kernel. gVisor exists for that last step, but I don't see anyone willing to sell me the ability to run my random container next to their mission-critical security-sensitive app, whereas people are perfectly happy to share CPUs with me if there is a hypervisor in the middle. But we're certainly moving in that direction.)
It is also intriguing to imagine a world that moves the other direction; just have a giant computer with thousands of power-efficient CPUs in it and no virtualization. When a request comes in to your app, your CPU is just powered on, your app boots in a millisecond, handles the request, and shuts down. I am not sure even the big cloud providers have solved the time-of-day utilization problems; being able to turn most of the computers off at night has some potential to save money. (I would turn my workstation off at night if it booted in 1 millisecond in the morning, for example. I can also imagine some power savings for mobile devices if they could go hard off for 59 seconds out of every minute.)
- vosper 7y ago> I am not sure even the big cloud providers have solved the time-of-day utilization problems Do AWS spot prices fall at night? That would be one way of increasing utilization - assuming, of course, that there’s sufficient demand at any viable price. There most only be so many jobs people are willing to run unobserved overnight in order to save money. Or perhaps AWS (and others) are actually powering systems up and down to meet demand? That makes a lot more sense, I suppose.
- mike_hock 7y ago"Safely" sharing a Linux kernel? There's no reason to believe Spectre and Meltdown were a one time thing, especially since the response has been to apply ad-hoc fixes just good enough to break the proofs-of-concept. On the contrary, they demonstrate that such vulnerabilities are possible and we should expect to see them again. Even barring CPU bugs, the kernel is one giant attack surface, all written in C, all running with full ring 0 privileges. Find ONE hole to pwn.
- jrockway 7y agoIt's not mainstream yet but it's the direction people want to go. Like I said, making the OS smaller means less attack surface, so it's certainly something worth investigating. But a lot of work has been done to make Linux safe enough, so that is a likely direction for the mainstream to go.
- tannhaeuser 7y agoUsing containers/Docker isn't reducing anything at all, neither from an energy efficiency, nor bloat PoV, since what's in the container comes on top of a full OS install. Moreover, Docker almost always runs on k8s (or Mesos) with its multiple networked re-implementations of base infrastructure such as dns, ntp, schedulers, etc. I think Docker and "microservices" with their heavy network use can't be counted as a win for energy efficiency, but have at best been portrayed as benefiting developer convenience.
- mekkkkkk 7y agoSuppose you have ten microservices. Running them in containers would surely be more energy efficient than in full blown VMs or dedicated machines?
- tannhaeuser 7y agoThen don't use ten "microservices" to accomplish a single task?
- paulddraper 7y agoWhat about using ten "microservices" to accomplish ten different tasks?
- mekkkkkk 7y agoHurr durr. I fully agree that the microservice architecture is abused and overused to all hell, but it is still valid in a lot of cases. It is a separate discussion, and I believe you know that.