News for hackers. Stuff that matters.
Re:Ask HN: Pros and cons of V8 isolates? by atonse on Wednesday June 15, 2022 @03:09PM (#31757853)
I am really hoping that someone builds an isolates based faas runtime. I think CloudFlare talked about open sourcing their stuff.

I have 3 products where I’d allow client code to run once we can make that happen.

Re:Ask HN: Pros and cons of V8 isolates? by paulgb on Wednesday June 15, 2022 @03:42PM (#31758348)
Is the appeal of isolates in this case the cold start time or the isolation? We're working on some open source infrastructure for running sandboxed (gVisor) containers on the fly from web services[1], and one of the use cases people have is serving Jupyter notebooks which seems like it might resemble your use case?

[1] https://github.com/drifting-in-space/spawner/

Re:Ask HN: Pros and cons of V8 isolates? by atonse on Wednesday June 15, 2022 @08:51PM (#31761340)
It’s the isolation and sandboxing. So in a sense deno is appealing because you can whitelist functionality.

Say things like custom workflow logic or custom data transformations. They might require an api call.

Re:Ask HN: Pros and cons of V8 isolates? by QuiiBz on Wednesday June 15, 2022 @04:09PM (#31758773)
I’m currently building a FaaS runtime using v8 isolates, which I hope to open-source soon. That’s actually not that hard since isolates are, isolated from each other.

Performance-wise, it’s also very promising. For a simple hello world, the « cold start » (which is mostly compile time) is around 10ms, and on subsequent requests it runs in 1ms.

Re:Ask HN: Pros and cons of V8 isolates? by jeremyjh on Wednesday June 15, 2022 @04:11PM (#31758795)
It doesn’t worry you that the v8 team specifically tells you not to do this?

eta link: https://v8.dev/docs/untrusted-code-mitigations#sandbox-untru...

Re:Ask HN: Pros and cons of V8 isolates? by QuiiBz on Wednesday June 15, 2022 @04:15PM (#31758850)
Can you give a link to this? Cloudflare (Workers) and Deno (Deploy) both uses v8 isolates for their runtimes, with I believe some significant clients running production code (huge clients like Vercel and Supabase use these solutions)

Edit:

> If you execute untrusted JavaScript and WebAssembly code in a separate process from any sensitive data, the potential impact of SSCA is greatly reduced. Through process isolation, SSCA attacks are only able to observe data that is sandboxed inside the same process along with the executing code, and not data from other processes.

I do run isolates in separate processes to prevent security issues, even if that may not be enough. Still an early prototype for now.

Re:Ask HN: Pros and cons of V8 isolates? by jeremyjh on Wednesday June 15, 2022 @04:24PM (#31758963)
I'm talking about this: https://v8.dev/docs/untrusted-code-mitigations#sandbox-untru...

As long as you run each customer in a separate OS-level process, you should be good. But then, that is not much different from Lambda or other FAAS implementations.

Re:Ask HN: Pros and cons of V8 isolates? by QuiiBz on Wednesday June 15, 2022 @04:31PM (#31759065)
For now, each process runs many isolates - but a single server run many processes. Cloudflare have implemented a similar mechanism [1]:

> Workers are distributed among cordons by assigning each worker a level of trust and separating low-trusted workers from those we trust more highly. As one example of this in operation: a customer who signs up for our free plan will not be scheduled in the same process as an enterprise customer. This provides some defense-in-depth in the case a zero-day security vulnerability is found in V8.

[1] https://blog.cloudflare.com/mitigating-spectre-and-other-sec...

Re:Ask HN: Pros and cons of V8 isolates? by ushakov on Wednesday June 15, 2022 @03:41PM (#31758329)
Blueboat may be what you’re looking for

https://github.com/losfair/blueboat