News for hackers. Stuff that matters.
Re:Ask HN: Pros and cons of V8 isolates? by tptacek on Wednesday June 15, 2022 @06:19PM (#31760151)
Point of order: containers aren't a mechanism to increase compute granularity; they're an abstraction designed to make compute easier to package and deploy. Containers can be bin-packed m:n into VMs or machines, but that's just a detail; over time, containers are all going to end up VM-scheduled, as VMs get cheaper and cheaper.

Meanwhile, the multitenant-containers/jails/zones people conclusively had the wrong side of the argument, despite how granular they were; multitenant shared-kernel is unsafe.

I have no opinion about whether language runtime isolation is competitively safe with virtualization. It's probably situational. I just object to the simple linear progression you're presenting.

Re:Ask HN: Pros and cons of V8 isolates? by ec109685 on Wednesday June 15, 2022 @09:56PM (#31761749)
Containers _are_ a mechanism to increase to compute granularity. Some of our workloads were having trouble scaling to 128 cores, and by using containers, we can have more of them running with fewer cpu's. Furthermore, it's straightforward to support providing burst capacity to applications running within a container, given all the OS needs to do is to give those cgroups some extra CPU time for a limited time.
Re:Ask HN: Pros and cons of V8 isolates? by csomar on Wednesday June 15, 2022 @11:59PM (#31762332)
> Containers _are_ a mechanism to increase to compute granularity. Some of our workloads were having trouble scaling to 128 cores, and by using containers, we can have more of them running with fewer cpu's.

As opposed to having VMs? Otherwise, I don't see how containers can increase granularity.

Re:Ask HN: Pros and cons of V8 isolates? by ec109685 on Saturday June 18, 2022 @02:36PM (#31792514)
As opposed to the original comment that says they aren’t useful for increasing granularity.
Re:Ask HN: Pros and cons of V8 isolates? by infogulch on Friday June 17, 2022 @10:34AM (#31778817)
It sounds like containers enabled you to manage the deployment of multiple processes on a single machine more easily which doesn't contradict the comment you're replying to. Would it not have been possible without containers?
Re:Ask HN: Pros and cons of V8 isolates? by kentonv on Thursday June 16, 2022 @09:24AM (#31765769)
> containers aren't a mechanism to increase compute granularity

Yes they are. Instead of thinking in terms of a whole running operating system with dozens of services, now you are thinking in terms of individual (micro?)services that are relatively isolated from each other. We stuff a lot more containers per box than we used to stuff VMs per box.

But it's true containers (of the namespace/cgroup/seccomp variety) have failed to be a sufficiently secure isolation mechanism to use them for multi-tenant scenarios, so instead we mostly pack containers from the same owner together.

I'd sort of argue that Firecracker and gVisor are actually container engines that happen to use CPU features meant for hardware VMs for additional security hardening. The granularity of compute that you put in them is more container-ish than traditional VM-ish.

Re:Ask HN: Pros and cons of V8 isolates? by willsher on Wednesday June 15, 2022 @07:20PM (#31760694)
They are, or should be, entirely self contained such that whatever segregation is employed - be it hardware via a VM or in kernel with apparmor or SELinux provides sufficient segregation for the work load. V8s problem is JavaScript and NPM, but limiting the blast radius with hardware virtualisation is a win for segregation and v8 will win, at least for front end, because it’s got the mindset. As long as the library ecosystem cleans up.
Re:Ask HN: Pros and cons of V8 isolates? by tptacek on Wednesday June 15, 2022 @08:37PM (#31761231)
"In kernel with apparmor or SELinux" can't possibly provide sufficient workload isolation, because it implies workloads share a kernel. It's easy to rattle off relatively recent kernel LPEs that no mandatory access control configuration would have prevented.

The Linux kernel simply wasn't designed to provide the kind of isolation "naive" containers want them to. Actually, generalize that out: Unix kernels in general weren't designed this way. It just doesn't work.

Re:Ask HN: Pros and cons of V8 isolates? by ignoramous on Thursday June 16, 2022 @01:13AM (#31762629)
End game then is LittleKernel/Zircon on Fly.io? When do we get to play with those?
Re:Ask HN: Pros and cons of V8 isolates? by willsher on Thursday June 16, 2022 @02:14AM (#31762935)
Whether software based access control is sufficient depends on the workload and where in the stack the workload runs. I agree though, hardware virtualisation based is more secure and less complex. It also requires access to bare metal, so a providers service or run it yourself, which is a trade off.
Re:Ask HN: Pros and cons of V8 isolates? by csomar on Wednesday June 15, 2022 @11:56PM (#31762317)
> over time, containers are all going to end up VM-scheduled, as VMs get cheaper and cheaper

That kind of started with Github actions.