Good morning, good afternoon, good evening, good whatever it is, wherever you are on this fine day. My name is Ali Amagasu and I'm welcoming you back to the Cloud Unfiltered podcast. This is our first episode from quarantine, which doesn't actually change a thing for us since we don't do the in-person interview thing, but it does put an odd, odd stress on the network. Everyone. is on the network, which, as Cisco, we appreciate. And we are doing everything we can to help with that. But I will tell you that right now I have two children in my home, distance learning, as I record a podcast where I'm having a video exchange with my co-host and the guests. So please forgive us if there's any audio weirdness. We are going to try to edit that out. But if something really juicy is said and there's audio weirdness, I'm keeping it. You're going to have to suck it up, digest the material as it is. Anyway, Pete, how are you doing? You know, things are pretty much the same here in the underground nerd lair in middle of nowhere, Michigan. Costco is open, so it's all good.
Right, you are in the middle of nowhere. You're in the perfect place for a pandemic. It's probably not coming to you if you danced around in your yard and tried to get it. Well, the thing is, right, like beds per capita is pretty much the same anywhere in the country. So there are fewer people, but there are also fewer beds. So, you know, it's a give and take. Fair assessment. Well, I'm glad to hear you're okay. So we do have a guest today. It's not just me and Pete hanging out and BSing. And we're thrilled that he's taking the time to join us in these very weird, weird times. I think all of our work schedules are a little funky right now.
I'm happy to welcome Tyler McMullen. He's the CTO of Fastly. He's going to talk with us about all kinds of things today, but first off, welcome, Tyler. Hello, and thank you for having me. Sure, sure. You know, as usual, we did some reading up on you to find out what you're into. You are a fairly, or you've been a prolific blogger, and you've talked about a lot of interesting things as far as open source communities and serverless and edge computing and WebAssembly, and it's all fascinating. So we'd like to talk to you about some of it. Pete, when you hear this list of interesting topics, where would you like to start off questioning Tyler?
Well, I'd like to start talking about WebAssembly and its influence on the edge, I think. Tyler wrote a really nice blog article in December where he laid out some things that he's seeing in industry. And the other things on that blog article were grassroots protocol deployment and encryption everywhere. But I guess, Tyler, if you could give us your take on WebAssembly and sort of what that is, where it's going, and what impact you think that might have on the edge. Yeah, I mean, this has been everything I've been living and breathing for the past three years or so at this point. So I'd be more than happy to talk about that. Yeah, I guess to me, what is actually really interesting about WebAssembly, and this we'll get back around to the edge thing momentarily. It started as a way of attempting to get legacy C programs typically into the web browser. But the way that the people who designed it went about this is that effectively what they did was they developed an intermediate language.
that actually exists in every web browser now. It's not just about legacy or anything like that. The really neat thing that was done, the really neat thing that has come out of it is the fact that we have possibly for the first time ever generally agreed upon an intermediate representation that multiple and many different languages will actually target that also provides a pretty decent level of safety and performance and also can run in a bunch of places. To me, this is the first time in computing history that this has actually happened. That's to me the reason that I'm actually super excited about it.
To me, what this says is, okay, well, if this thing is designed to be able to run anywhere, and it's designed to be safe to run anywhere, that means that we may actually have the beginnings of a platform that can be consistent across a whole bunch of different platforms, across a bunch of different places that you could run code, right? So for instance, the browser is just the start of it. Obviously, we have actually are working on an edge computing story around this. Likewise, I also know people who are working on getting WebAssembly running natively inside of Kubernetes. I am friends with the people over at various companies that are working on.
WebAssembly inside of Secure Enclaves or WebAssembly on mobile devices. There's so many different applications of this. We have this opportunity right now where we have the opportunity to create a platform that is actually consistent across all of these. To me, that's super exciting. For those that don't know, and I'm uneducated on this as well, can you get into how WebAssembly accomplishes that? So in concept, it's similar to what we saw with Java bytecodes and the JVM going back 25 years. And I mean, I turned 50 last month. I like to joke to people that I didn't learn Java in college because it hadn't been invented yet. So like I got to see this professionally happen and try to convince ops people that JVMs weren't a performance overhead big enough to warrant concern.
So are we seeing, I guess, can we get into some of the guts about how WebAssembly works and whether or not we're going to have to rehash some of these arguments that we've had multiple times about any time you have some kind of abstraction that makes functionality portable, you inevitably are paying at least some performance penalty in how you get around some of those things. Sure, sure. Yeah, so the relationship between JVM bytecode and WebAssembly is something that actually comes up quite a bit. There are interesting similarities and there are pretty dramatic differences between them. So to me, obviously the similarities are it's designed to run anywhere. It's supposed to be portable across many different platforms. But to me, the differences are actually more stark. So some of the things that jump out to me immediately are the size of the WebAssembly specification is very small. There's also a specification, which is a pretty key difference, at least from the early days of the JVM bytecode. And more than just a spec for it, there's also proofs.
of it so we can prove both the type safety and also the memory safety of the WebAssembly language itself. To me, safety and confidence in that safety are one of the biggest things. The other thing that's interesting about WebAssembly is that it doesn't actually have a lot of the weirder, more dynamic features that you would find in a typical language-specific bytecode. For instance, there's no way to do things like dynamic dispatch in WebAssembly. That in some ways limits things at the moment.
But what it also means is that it is the portability of the platform itself is much higher, right? It means that you can get it, you can interpret it. I can also statically compile it ahead of time, which is what we're doing via our Lucid project at Fastly at the moment. Yeah, I don't know if that totally answers your question, but that's kind of the way I look at it, is that it's like a safety and even greater portability sort of spin on it. Sorry, I guess the one other thing with it is that JVM Bycode was really interesting because it ended up being used for a bunch of different languages, ultimately. Like in the end, if you look at what it's done today, you have Scala, and you have Clojure, and you have Java still, and JRuby, and so on. But that was the thing that happened over the course of many years, right? JVM Bycode was really designed for Java, and I think if you've dug into it, you probably know that really well. WebAssembly was made from the beginning to be portable across all these different languages. That's, to me, the other big difference.
And are you finding, is the community finding that the legacy applications, you used a C example earlier. Anytime somebody started talking about C, the very first job I had out of college in 1993 was working at an R&D lab at HP. And we had this big C code base and we would compile it on HP 3000s, but then we would link it on HP 9000s. And you had to have all that branching for your .h files at the beginning of Cs and things like that. So when we say legacy C applications, do we mean like that kind of spaghetti kind of stuff? Or does it mean if I wrote something for some embedded system?
you know maybe in the last 10 years but not in the last 25 years do i have a chance of running that on web assembly or how much surgery do i have to do to sort of splice it into this new model Yeah, you're right. Legacy might actually be too strong of a term for this. It really is surprisingly easy to port modern applications as well as older applications. The entire C standard spec works just fine in WebAssembly. I hear you on the large C code bases. A lot of Fastly is still in C, although we're in the process of porting a lot of things or rewriting things in Rust at this point, again, for safety purposes. But C is definitely still alive and kicking. For me to understand the bigger picture, if you could take it just a little bit of a step back. You talked a little bit about how WebAssembly was used initially, but how is it used?
ideally as we move forward? Like what would be the goal? And is there a lot of energy behind this? Or are you kind of part of a small band with a big dream that it goes in that position? So to me, the ideal use for WebAssembly is one where it actually kind of disappears into the background, where it's the basis for a lot of platforms and a lot of people are using it, but they don't necessarily know they're using it. To me, it's kind of funny at the moment. People talk about WebAssembly a lot. Obviously, I am doing that and I do that frequently. But in some ways, it's similar to someone talking about x86 assembly code. That's not a thing that you have to think about all that frequently anymore. And the fact that we're not talking about it kind of indicates probably what the future of WebAssembly becomes in an ideal world where it just fades into the background. It's just part of the ether of computing.
Yeah. Yeah. Yeah. As for like, you know, am I part of a small band or a large group? I think there's kind of two sides to this one. The WebAssembly community as a whole is surprisingly large at this point. There's a lot of people doing a lot of interesting things with it now. That said, obviously, like we maybe you saw the post about this. We founded an organization called the Bytecode Alliance with along with Mozilla, Intel. Yeah. Along with Mozilla, Intel and Red Hat back at the end of last year. And kind of one of the reasons that we did that is kind of to drive this like multi-platform WebAssembly everywhere sort of vision.
for it. And so a lot of the stuff that we're working on right now is the infrastructure to allow that to happen. So Mozilla contributed something called WasmTime, which is a JIT-based WebAssembly runtime and compiler. That's backed by a project called CraneLift. CraneLift is also embedded into Firefox. So if you're using Firefox, I believe it's on nightly and possibly beta at this point, I'd have to confirm that, but then you are actually using CraneLift. And that is the same thing that's driving Fastly's new Computed Edge platform. We have our Lucid project, which uses CraneLift behind the scenes. So Fastly is actually running the same, basically we're using the same compiler that Firefox is at this point.
Likewise, Intel has brought along their Whammer project, which is the WebAssembly micro runtime, and Red Hat is working on something for secure enclave WebAssembly computing. What we're really attempting to do with this is to create a space where many different types of platforms can develop things that interoperate really well. Nice. It doesn't sound like it's a tiny band. It sounds like there's some significant energy behind it. Is there any competing effort to standardize or to move behind something similar to WebAssembly? Or does this seem like the obvious direction that things should go?
That's an interesting question. I don't really know of any other competing things for that at the moment. It's a relatively small group of people that are working on this specific thing. I think a lot of the other folks in the WebAssembly community are still focused on the browser side of things, which is also important. That is where the majority of developers write the majority of their code now. It runs in the browser. Getting a really good story around how to use WebAssembly in the browser is probably one of the most important things. We're just focusing on the other side of it. Makes sense. I know I derailed your technical line of questioning. Did you have more that you wanted to cover there? Yeah, I'm really anxious to know how Fastly is now going to try to use this paradigm on the edge.
What we're doing at the Edge with WebAssembly is we're actually basing our computing system on WebAssembly. Fastly from the very beginning has always allowed some level of computation on our network that was done via the VCL, the Varnish Configuration Language since the earliest days of the company back in 2011. A few years back, we had the realization that we really wanted to allow our customers to do much more complex things, but how are we going to do that in a way that is both highly performant and also safe? When we went down this path, I tried a bunch of different ways of doing this. I tried, let's embed the V8 JavaScript engine into our server, and that's fine. That is certainly what a lot of companies are doing at this point. I was not pleased with the performance of that setup. I think that it makes the wrong trade-offs for this type of application, for the types of applications that we see running at the edge.
I started going down a more interesting path. I guess there's one other thing about that is that a lot of times when you end up with this safety versus performance trade-off. The way that a lot of these systems, if you're using Docker containers or V8 or one of these other larger, more intense virtual machines or abstractions of virtual machines essentially, you end up having to make this interesting trade-off where you say, I'm going to spin up the sandbox for this thing to run in. And spinning up that sandbox is actually really expensive to do. And so you end up keeping the sandbox around. And one user comes in and uses the sandbox, and they're done with it. And the next user comes in and uses the same sandbox. And to me, from a security perspective, that always struck me as a little bit nerve-inducing. It's like, OK, well, how do I know that there wasn't something left behind? What about the privacy of the user that came before them? What about the safety of them? And so the reason that we ended up going with WebAssembly for this, or one of the key reasons, was that we could actually not have to make that performance versus safety trade-off. One of the things that is interesting about WebAssembly to me is that it's actually really easy and really trivial.
if you are statically compiling it to make sandboxes of WebAssembly start really, really fast. So like Lucid's big contribution at this point is the fact that we can start a sandbox in about 35 microseconds or thereabouts, right? And so it kind of completely changes things. It means that what we can do is we can say, okay, as the request is coming into our network, as any end user request is coming into the network, it means that we can spin up one of these little secure sandboxes for that specific request. So every individual request is sandboxed individually. So they're not in the same sandbox? Is that the takeaway?
Exactly. It's the thing that most developers probably don't even think about. They're like, oh, it's a sandbox, whatever. When we're coming at it as an infrastructure provider, that's something I have to care about. Anyway, this is all a long way of saying what we're doing with it is building a generalized edge computing platform that attempts to not make the trade-off between safety and performance is ultimately where I'm going with that.
I like the sandbox example. That helps me a lot. That helps me understand a very tangible security issue that I'm sure tons of companies let people just trot in and out of the sandbox and leave all kinds of data and open stuff behind. Exactly. A lot of times people make the assumption that the thing that we would like to protect is outside of the sandbox. So you're trying to keep the user in the sandbox to protect something outside of the sandbox. But if you're reusing sandboxes, there could be things that are valuable left behind by previous users of that. So this is a way that we are hoping to protect our own infrastructure while also protecting your users.
It's leaving your Gmail account open on the hotel, you know, computer when you have like some random situation where you need to log on to that central hotel, you know, PC, which just happened to me recently. And I darted out the door, got on a shuttle bus and had to make the shuttle bus turn around because I was like, I left my Google browser open. Did I hear that correctly? Did you say 35 microseconds? Yeah, on the high end. Yeah, that's about right. So and so what do you get in that? What does that sandbox include for that? And I'm leading you out there on that to try to make a comparison to something else.
Sure. Fair enough. So this is a sandbox in a very different way than one might imagine, say, a proper virtualization or a Docker container or something like that. So what you get with this is you get memory safety and control flow safety for the most part. So what it means is that one of these sandboxes can be spun up inside of a process that is already existing. You might be able to spin up hundreds or thousands or, in our case, maybe tens of thousands of these things inside the same process.
The guarantees that you get are that given that you have given it a specific amount or specific area of memory to work in, and given that you have told it like, okay, here are the functions and the areas of code that you're allowed to call, you can be assured that it will not break out of those two things. Those are the key points of that one anyway. So do you get a language runtime with that of your choice or it sounds like you don't get a full Linux kernel for something like that? No, so that's actually to me, like one of the more interesting parts of this is that effectively, like you are making the process that is running the sandbox, the kernel to that sandbox, if that makes any sense. No, it does. I mean, as long as you have a language runtime and you have some way of, given that lifetime, you probably don't get like, you can't do like an f.open, like you don't have file access, but you presumably could make REST API calls outside of your sandbox. Is that a valid assumption?
Kind of, actually. It's a little bit different than that. Let's use Rust as an example. When Rust compiles to either x86 or whatever else or WebAssembly, it doesn't actually have an external runtime. It's not a managed language in that way, in the same way that C or C++ are not managed languages. It's all actually embedded into the compiled code. What that code interacts with is actually a lot more like an Fopen sort of thing. When you're compiling it to WebAssembly, Rust currently targets something called WASI, which is the WebAssembly system interface. It's like POSIX for WebAssembly.
right now. That's the start of where we're going with it. But I see where you're going with the language runtime side of it. This only works for unmanaged statically compiled languages at the moment. I'm happy to talk about where WebAssembly is going with that as well to embrace more dynamic languages if you would like.
Pete, what are you comparing that 35 microseconds to? Should I be, is that fancy? Should I be in awe over the 35 microseconds or should I, you know? So I routinely make this comparison in talks that I give, you know, in and out of Cisco. That it used to be when I first started in 93 doing this professionally, if you wanted a new unit of compute, the turnaround time for that was months because you had to order a new physical server. And then in the late 90s, we got virtualization, which was originally designed for the CFOs of the world so that we could get better utilization out of the physical hardware we already bought, but do so in such a way such that if I was a bad actor, that I don't wreck Tyler's process.
So we invented the hypervisor, and we now all of a sudden could get units of compute in minutes instead of months. And then somebody realized, hey, there's this resource separation mechanism built into the Linux kernel already. And if we eliminated the hypervisor, we could create new units of compute in seconds instead of minutes. And that's what a container is. And then AWS said, well, if you are very specific, if you, instead of having...
hypervisors on top of generic compute. If you had specific hypervisor on top of a specific compute, you can have firecracker, which gives you a unit of compute in milliseconds. And that's the basis for AWS Lambda. So for Tyler to sit here on this call and tell me that they've cracked it down to 35 microseconds. So like 3.5 milliseconds, that's then taking that same, you know, when I started, it was months and now he's telling me it's three and a half milliseconds. So like that's, that's a continuum along this line of how long does it take to create a unit of compute? So really what I was trying to hit Tyler with is, okay, if you're getting it down to 3.5 milliseconds, what am I losing? Like, what do I get?
in that unit of compute compared to this full Linux shell I can get on Firecracker in AWS. So I should be impressed, but I can also be suspicious. Entirely be fair. So for the record, Pete, it was actually 0.035 milliseconds. I'm not doing the decimal place moving in my head correctly. Totally fine. Yeah, yeah, yeah. So 0.035 milliseconds. So I think the reason, and if I heard someone say this a couple years ago before we started developing this thing, I would be like, that person is full of it. I don't believe a word that they're saying. I think I can convince you that I'm not full of it, though.
The difference between something like a firecracker or containers in general versus a WebAssembly sandbox to me is about the assumptions that you can make about the code that is running inside of it. If you look at the way a container or any of the process level isolation primitives work, is that they make the assumption that what is running inside of them, that you can't actually make any guarantees about it. It could try to do anything in the world, that it could attempt to call whatever syscalls, it could attempt to run. assembly operations that it's not actually that you don't want to allow it to. You have to put a lot more safeguards in place to prevent from doing those things. The thing with WebAssembly is that when you look at the way Lucid works, is that it's more of a collaboration between the compiler, the WebAssembly compiler, and the runtime. When we compile something with Lucid, we say, okay, here is all the native machine code. It has been compiled such that as long as you follow this contract that is also included with the binary, as long as you follow this contract and say, this needs this amount of
physical memory, it needs this amount of virtual memory and this many guard pages, and it needs to be spun up in these specific ways. If you can actually follow this contract, then I can guarantee that this is safe. And so ultimately, what it ends up meaning is that as long as you have those specific things in place, you actually have to do very, very little to spin one of these up. So it's essentially like allocate the memory and jump into it, ultimately. So again, going back to this comparison of, say, between a container and a serverless runtime, what you typically lose there is specifically file management and more generally state management, right? Every time a serverless runtime spins up your unit of compute, you have no state whatsoever and you potentially have to reload it from a database or some other remote source. Whereas in a container, you've got volumes that are attached storage that you could potentially use to carry state from invocation to invocation. So when we're taking this to WebAssembly,
What is the thing? Is there something else I'm losing to get this microsecond based startup time? Whereas between container and serverless runtime, I'm giving up file access essentially. So is there something else I'm giving up in WebAssembly to get that insane speed? Because I can see plenty of use cases where if you just need to transform some piece of data that comes into you and you don't need outside state to help you do that, then yeah, I would absolutely do that for 35 milliseconds. But there's other use cases where I still need state. Can I make an HTTP call to NoSQL server somewhere?
to get something about my state and then use that as part of this data transformation, for example. Yeah, yeah. No, that makes a ton of sense. So there's a couple of things that you're giving up. One of them is WebAssembly gets fairly close to native speeds, but it's not actually as fast as native speed. It's almost there, but it's not. There are safety guarantees that we have to build into the generator. So making bounds checking and things like that to make sure that you can't break out of it. The other thing that you end up giving up or, well, this is an interesting one because it's not so much giving up as there aren't. Okay, let me step back. So in the same way that you would give up file system access inside of a typical serverless environment, inside of a typical WebAssembly environment, that kind of thing is undefined.
That is where the WASI thing comes in. That is trying to define that interface. For instance, unlike the Fastly platform at the moment, it is stateless as you spin up all of these individual sandboxes. You do have file system access or what you have actually is something that looks like file system access. You have a virtual file system of some kind. One of the neat things about the fact that the process that the sandbox is embedded into.
becomes the kernel to that little sandbox is that you get to define what that means. So the embedder, the person who is creating the WebAssembly runtime that you're running on, gets to define what it means to open a file. So if I say, maybe I want to say, I want to let this user log things out to some logging provider. What I could do is make a file, a quote unquote file on their virtual file system that is slash logs slash my logging provider. If you open that and write to it, my host code gets to say what exactly that means. So it could say, okay, cool, they wrote something to this file. So what that means is I need to send it out to their logging provider.
for instance. So you get a lot of flexibility, but you also get a certain level of undefined nature to the beast. Got it. Well, and I would imagine, too, there's issues with what's the consistency level of that write, and does that mean the same thing on different systems, strong versus eventual? Yeah, yeah. So that's one of the downsides to such an early stage project. WebAssembly has been around for a little while now, but trying to run WebAssembly outside of the browser is a relatively new concept. And so we're still in the early days of trying to define the semantics of what a lot of these things mean.
Got it. That's a super interesting space. I would totally lead with the 35 microseconds startup time. That just blows me away. That completely blows me away.
Thank you. I appreciate that. Tyler, can you just tell me, what do you guys do? What is the summary of what Fastly is and does? Yeah, so Fastly is an edge cloud. And so we kind of started out as like a smart CDN of sorts. We define ourselves as an edge cloud now, and that is like what we have been from the beginning. But essentially what it means is that we provide services that allow people to deliver content and logic all around the world as fast as possible. So that ends up looking like the fact that we have a massive global network of servers that does terabits upon terabits of traffic these days. And the whole idea with it is that we have from the beginning.
from the beginning, been trying to make it possible for our customers to move some of the logic that only has existed inside of their centralized data centers out toward their users. Again, I don't know, this comes back to what is the edge? People will fight for hours about what the edge is. Oh, I'm sure. I have been fighting for my definition for eight years now and I'll continue fighting for mine. I actually defined it in a much more broad and abstract way. Typically in computing paradigms, you have your client and you have your org and you have your server.
Typically, people don't think about the fact that there are tons of other hops in between where computation could happen. And so to me, rather than defining the edge as one arbitrary position within that chain, I like to define it as kind of the entire chain in between. To me, the edge could actually fit into any one of these things. So a lot of what Fastly has done is attempt to make it possible for people to take things that were on one end of this and move it toward the other to make their systems more resilient, to make their users' latency lower and so on. Great. That's a great definition of the edge. That is one that has not been locked out on our show yet, I think I can safely say. So I'm glad you shared it. Thanks so much for spending time with us today. I know things are hectic at our company right now. They're probably hectic at yours, but we appreciate you taking time to chat us up and we hope you'll come back in the future. Thank you for having me.