S11 Bonus: The Cloud Tax & The 10,000 JVM Milestone: Why Performance Optimization is the Only Way to Scale Enterprise AI Without Blowing Your Budget with Simon Ritter, Deputy CTO of Azul [0:00:00] Simon Ritter: It's a very sort of old adage, if you like, which is a picture is worth a thousand words. So, if you're trying to explain something to somebody, trying to do it purely with your voice or writing it down can be very difficult. But if you can present a picture, then that gives something visual for people to look at and go, okay, I can see what you're saying. And then you explain that using words to highlight the individual parts. that is a very powerful way of getting a message across. And especially when you're dealing with complex concepts, being able to break it down into a diagram and be able to use pictures to show what's actually happening. My name is Simon Ritter. I'm the Deputy CTO at Azul. [0:00:46] Noah Labhart: This is Code Story, a podcast bringing you interviews with tech visionaries. [0:00:52] Clip: Six months moonlighting. There's nothing on the back end. [0:00:56] Noah Labhart: Share what it takes to change an industry. [0:00:58] Clip: I don't exactly know what to do next. It took many goes to get right. [0:01:01] Noah Labhart: Who built the teams that have their back. [0:01:04] Clip: A company is its people. The teams help each other achieve more. Most proud of our team. [0:01:08] Noah Labhart: Keeping scalability top of mind. [0:01:11] Clip: All that infrastructure was a pain. Yes, we've been fighting it as we've grown. Total waste of time. [0:01:15] Noah Labhart: The stories you don't read in the headlines. [0:01:18] Clip: It's not an easy thing to achieve, my dear. Took it off the shelf and dusted it off and tried it again. [0:01:22] Noah Labhart: again to ride the ups and downs of the startup life. [0:01:26] Clip: You need to really want it. It's not just about technology. [0:01:29] Noah Labhart: All this and more on Code Story. I'm your host, Noah Labhart. And today, how Simon Ritter is making Java secure, efficient, and affordable, i.e. the most trusted Java platform founded on open source. Simon Ritter has been in the IT industry for 40 years. He went from university to work on Unix in the early days, employed by AT&T and programming in the C language. In 1996, he switched gears to join Sun Microsystems, programming in Java. Years later, after the Oracle transition, he started to dig into what might be next. But outside of tech, he's married with an older son. head, meaning he's really into cars. In fact, in the last few years, he and his son rebuilt a classic Mini from the ground up. While Simon was at Oracle, he started to crave a different opportunity, but still in the Java space. He stumbled upon a company digging into powering the Java platform to make it the most secure, efficient, and trusted platform on the planet. it. And he and the company found a great fit. This is Simon's creation story at Azul. [0:02:49] Simon Ritter: Because I was at Oracle, as I said, and I could see that the way that things were going internally at Oracle in terms of my position and the team that I was working in, that things weren't really going in the direction that I wanted to go in. So I thought to myself, okay, been at Oracle for five years trying to look around for an alternative. I'd heard about Azul. I knew about Azul because they were in the Java space. And I thought, I'll just randomly approach them. And so I sent an email to their sort of careers at Azul email address. I said, here's my resume, here's my background, just wondering if you might have anything that would be of interest to me. It led to an offer of a job and it was like, yep, okay, great. So that's how I ended up there. I think a lot of it was because one of the big interesting things that I had before that was the whole idea of the way that Java does automated memory management. There's this thing called garbage collection. So I've been heavily involved in that at Sun and Oracle. And that was one of the things that Azul was focused on in terms of their, what used to be called Zing and is now Platform Prime. So the high performance side of Java that they did was at that time purely focused on how do we change memory management so that we can avoid latency in the way applications work. And that sort of made a very seamless match for us from the skills that I had and what Azul was doing at that point. So, yeah, what does Azul do? We are a company that is 100% focused on Java. Realistically, you can say that we have three products. First product is what we call Platform Core, and that's a straight build of open source Java. The analogy I like to use there is that you've got Linux as an open source project. But if you want to use Linux to run your application, it's very unlikely you'd go to Linux to download all the source code, build it yourself, and install it on your machine. What you're most likely going to do is get a distribution of that, which will be Red Hat or SUSE or Ubuntu or whoever. Same thing applies with Java. Java is an open source project. It was open sourced by Sun back in 2007. And if you want to use it to run your applications, unlikely you'd build it yourself. So you go and you find a distribution. that have been the sort of primary distribution that most people have used up until a few years ago. But when Oracle changed the licensing terms and the pricing that they had for Java, suddenly people started looking around for a different distribution. And so one of the things we do is we provide a fully supported distribution of OpenJDK, straight drop-in replacement for Oracle. The idea of that is that for people who want support for their Java runtime, they can do that with us in exactly the same way they would do with Oracle. They're just paying a whole lot less than they do to Oracle. The second half of our business really is about high performance Java. And that's what I mentioned when I joined the company, because that's what we were focused on purely at that time. And that's Platform Prime, or as it used to be called, Zing. The idea there is that, again, we take the open source Java, rather than just building it in the same way that everybody else does, we change things internally to give you better performance. When I joined the company, we only changed the way that things work in terms of the garbage collections, the automated memory management. If you look at the way that most garbage collectors work is that they move objects around within the memory. And in order to do that safely, you pause the application while you do that. Application can't make changes to the data. You move it around. It's all safe. The problem with that is that the bigger your heap, as we call it, so the way you store your objects, the longer the pauses you're going to see associated with with garbage collection. Now, if you're lucky, it's, you know, of the order of 10 or maybe 15 milliseconds, so you don't really see it. But you can get longer pauses. You can get seconds, minutes. Longest pause I ever heard of in terms of garbage collections was one and a half days. Very extreme, but we won't go into that. But the idea of our garbage collector was to say, okay, we'll allow you to continue to update objects whilst we're moving around, but do it completely safely. And that way we can eliminate problems of these seconds of pauses Milliseconds of pauses. And initially, that was very popular with things like financial services. You're doing stock trading, FX trading. Then the longer you have to pause doing a trade, the more chance you're going to lose money. So that was the initial sort of idea. And then we've progressed from there in terms of developing the product further. [0:07:03] Noah Labhart: A lot of times on the show, I talk about MVPs from founders and things like that. I'm curious what your MVP was when you joined Azul, right? So 10 years, lots can happen. can change. You mentioned when you joined the company, you were focused on kind of one specific angle. Tell me about that. What was your MVP as you joined Azul and what sort of tools were you using to bring it to life? [0:07:25] Simon Ritter: When I joined the company, it was all about that automated memory management. What we had to do was focus on how could we do that in such a way that we wouldn't distort the way that Java performs in different ways. Because of course, there's always a cost associated with moving work around. So if we divide the work up so that it happens with the application, then what is better performance from a latency perspective, but then you also see a decrease in terms of throughput. So we had to come up with ways of solving that problem. Certainly one of the things that I also had a lot to do with was, based on my previous role at Oracle and some before that, was helping customers understand what it was we did. Because going to a customer and saying, with the way that Java works is, okay, but how does it actually work internally? So a lot of it is trying to explain those kinds of things to people in a way that they can understand without going down right into the weeds and talking about the very low level things in terms of read barriers and your text locks and things like that. So taking it to a high enough level that people can grasp what it is we're doing, but a low enough level that people understand the benefits of what what we're doing. [0:08:37] Noah Labhart: I'm curious about in, you know, coming up with those, you know, those explanations where you communicated the value, but it wasn't, you know, too deep, right? A decision or trade-off you had to make and how you're going to communicate that, right? Because there's different ways you could go about that, right? There's different ways you could, you could dig in, you could dive in, dive out, zoom in, zoom out, that whole thing. I'm curious about a decision or a trade-off that you and the company made and how you coped with it. [0:09:03] Simon Ritter: It's a very sort of old adage, if you is that a picture is worth a thousand words. So if you're trying to explain something to somebody, trying to do it purely with your voice or writing it down can be very difficult. But if you can present a picture, then that gives something visual for people to look at and go, okay, I can see what you're saying. And then you explain that using words to highlight the individual part. That is a very powerful way of getting a message across. And especially when when you're dealing with complex concepts, being able to break it down into a diagram and be able to use pictures to show what's actually happening. And especially when you're using things like PowerPoint, because you can do build outs of the individual slides. So you can say, okay, we do this bit and then this happens and you can show progression through that. [0:09:54] Noah Labhart: So let's move forward then. And you mentioned this kind of in your overview there, but I'm curious about how you progressed and matured, aspect and communicating this value. Tell me about how you progressed and matured that and how the product offerings in general progressed and matured. And I kind of liken that to, you know, how you built your roadmap. How do you go about deciding that, okay, this is the next most important thing to build or to address? [0:10:20] Simon Ritter: We basically got to a point where we decided that we had solved the problem. And there really wasn't very much to do beyond what we had actually done. So it's okay. Well, we've got that working as well as it's going to work. There is nothing to improve it. There might be a few little tweaks and things, especially as hardware progresses. But from a development perspective, there really wasn't a lot to consider where we could go in this direction or that direction. So what we then did was think about, okay, so we've solved that one problem in the way that we do things internally. What else could we solve in terms of performance? And that led us to doing a couple of different things. The way that Java works internally is that the whole concept of what was called write once, run anywhere. So if you take the same application and you can run it on Windows on an Intel box or you can run it on Linux on an ARM box, you don't have to recompile it. And that relies on using what are called bytecodes. So bytecodes are instructions for a virtual machine, hence the Java virtual machine. And what you have to do then is you have to translate those bytecodes at runtime into the instructions of whichever platform you're on. The way that happens is now a little bit more complicated or sophisticated, I should say, not complicated, sophisticated than it was in the early days. And we have this thing called a just-in-time compiler. So you start running your application, you take your bytecodes, you interpret them, converting them directly into instructions. But over time, what you do is you identify where you've got frequently called pieces of code. And when you find a piece of code that's called very frequently, you say, let's pass it to a compiler internally, compile that all into native instructions and that will run faster. And we do that a couple of different phases to get initially compile code and then to do heavily optimized code. So we looked at that and we said, we could actually change the second part of that to use a different compiler, and we can use different techniques to compile the code and optimize it, which will give us better performance. And so that's what we did. So we changed a different part of the JVM, the JIT compiler, so so that we could address where we were losing throughput because of the way that we did the garbage collection and dividing it up whilst the application was still doing its work. We could then address that by saying, let's provide better performing code. And that has really led to a lot of benefits for our customers because we can deliver better performing code with lower latency. And that addresses problems that people might be having with performance. So if their application isn't performing as well as they want it to, then we can say, get better performance without changing any of the aspects of your application itself. But that then has a sort of a flip side benefit, which is you can say everybody's now moving to the cloud. Everybody's shifting their workloads into the cloud. And the idea behind that is that utility-based pricing model means that you can save money on what you're provisioning. Great. Except that what most people find is they shift their workloads to the cloud and they actually end up spending more than they were spending in their own data center. Now there's a number of One of the things that obviously people have to do is they have to provision certain sized instances to run the different workloads. What we can offer there is you say, okay, use our JVM, which has better performance in terms of compile code, low latency. By doing that, you can provide the same carrying capacity, the same number of transactions per second, but because it performs better, you can use smaller instances or less instances. is. And that way you get what we call cloud cost optimization. [0:13:52] Noah Labhart: As you're doing all of this, you got to have the right people at the helm. And, you know, joining the company, I'm sure they had an amazing team. Over 10 years, you had to grow that team and to accomplish, you know, different things. How did you do that? And how does your company do that? And what do you look for in these people to indicate that they're the winning horses to join you? [0:14:11] Simon Ritter: That is something that is a challenge for us especially because even though we're a company that's focused purely on Java we actually don't hire very many people who program in Java because that's not where we actually work so the JVM itself is written in C++. So what we're really looking for is C++ programmers, not Java programmers but even then it's a bit more involved than that in terms of the skill set that we're looking for, because yes, you can find plenty of people who've done C++ programming, but what What we're really looking for is people who have worked on the JVM itself. And so understand the data structures that are used, the algorithms that are used internally. And that is a challenge because there aren't that many people who've done that. There were a lot of people at Sun who did it initially when Java was created. Obviously, they hired and trained engineers over time, then Oracle, the same thing. So we do find that where people have left Sun or left Oracle, we've certainly been approached by some people and we've hired them us. But yes, it is definitely a challenge in terms of finding the right people. One of the areas that is quite good in terms of looking for new talent is academia. So looking at universities, because a lot of people do research projects and they think, oh, let's do a research project on Java, look at the JVM, how can I improve performance in the JVM, address different aspects of that. So if we find people who publish papers that are related to that, then they potentially are a good terms of looking for recruitment. [0:15:45] Noah Labhart: I'm curious about scalability. And this will be interesting because it could apply in all kinds of different ways. Distribution, it could be people, it could be the actual software itself. So I'm curious where you want to take it. How have you approached scalability? Where has scalability reared its ugly head on the ugly side of scalability? And And has there been interesting areas we've had to fight it as you've grown? [0:16:10] Simon Ritter: So if I go in reverse order for that and look at the software scalability aspect first, that's one of the things that we've focused on a lot is how do we scale our software up to enable people to run much bigger workloads? And that's one of the key things that Java has been very famous for. One of the reasons why it's maintained its popularity over 30 years is because it will scale up to internet-sized workloads. clothes. People like Netflix, people like Salesforce use it for running their applications because they can scale up to tens of thousands, hundreds of thousands, millions of users. Then what we've looked at is how do we improve that further? And so that kind of leads into another more recent development we've done in terms of product, which is the idea of, again, because people are moving into the cloud, why don't we decouple the JIT compiler from the JVM and make it into a centralized service? So JIT as a service. When people are using microservices, instances of the same service, why have each of those services compiling exactly the same code in exactly the same way within each JVM? Why not offload that into a centralized service, have that happen remotely? That then reduces the amount of resources you need to do the compilation locally or run the application locally. Then by centralizing it, you can also cache the results. And when you start up new instances of the service, the code's already compiled, so we can can just pass that back straight away. When you look at scalability on the team side and the corporate side, that's, again, always been a challenge because, again, coming back to the sort of the scarceness of resource that we have in terms of skilled engineers, we have to make sure that we use the time of the ones that we do have as well as possible. And that is where you have to be thinking very carefully about what projects do we work on and what things make sense in terms of does it improve the product or are we going off on a slightly, a bit of a tangent and maybe that's not going to be quite so helpful. So the scalability aspect of the team does become something that we really have to be aware of because of the scarceness of resource. [0:18:12] Noah Labhart: From where you are now and all that you've accomplished over this past 10 years with Azul in particular, as you kind of step out on the balcony and look across all that you've built, what are you most proud of? [0:18:24] Simon Ritter: I'm most proud of the fact that we have delivered on helping people to use Java to run their applications in a more efficient way. Because, again, if I think back all the way through to when I started at Sun, I was very heavily involved at that time in trying to drive the adoption of Java. because back in 1997, 1998, which is when I really started that, was where we were really trying to get developers to adopt Java. And so I've seen over the last sort of 30 years how Java has continued to grow in terms of its use, especially in terms of server-based applications. We've moved away from the desktop, but Java is hugely popular and hugely successful on the server side. And when you do look at companies like Netflix that run their content delivery system using In terms of Azul, what I'm most proud of is the way that we have helped lots of customers to deliver those applications using Java and making Java successful by helping them to get better performance from it. [0:19:30] Noah Labhart: Okay, let's flip the script a little bit. Tell me about a mistake you made and how you and your team responded to it. [0:19:37] Simon Ritter: that's where, as I said, you need to be careful in terms of going off at a tangent where you think something might be useful, you try it for a while, and then you decide, yeah, actually that's not going to really help. Back in the early days when I joined Azul, we had one project that we were working on, which was looking at how we could improve the efficiency of the way that memory was used internally in the JVM. So not just the way that we did the garbage collection, the memory management, but how objects were laid out in the heap. And this was because we were looking at the way that languages like C++ worked, and C as well, because in C and C++ you have a concept of a struct, which is where you can have different types of objects grouped together and they get placed into memory contiguously, which is all good and it's very efficient because you get the benefits of the locality of reference, as it's called. So you're dealing with memory that's close together, so the cache works very effectively with that. So we thought, okay, let's apply that kind of idea to Java. So we came up with a sort of solution to this and we created a library that would do this, and we did some work in the JVM as well, but it was never going to fly. So it was a great idea, but it just didn't work out in practice. And also trying to get that adopted into standard Java is also like a big hurdle. And we went down that road a little bit and then we just decided, yeah, this is not going to work. It's not going to be beneficial enough to customers. And we'd have to go through so much effort to try and get it into standard Java that we just abandoned this as a project. [0:21:13] Noah Labhart: This will be really interesting. Tell me what the future looks like for Azul, for the offerings that you have and for your team. [0:21:22] Simon Ritter: If I think about the individual products that we have, I don't really see much development, if you like, in terms of the future, because what we're doing is simply delivering distribution in the same way that you get from Linux and that sort of thing. On the Prime side, we're always looking at how can we take performance to the next level. As I said, things like the cloud-native compiler, as we call it, so the JIT as a service, came out of the how can we improve the efficiency of Java further. further we've got another project that we've been working on and we just recently introduced into prime, which is Java on CRaC. Maybe needed to think about the marketing naming of that, but essentially what this does is it allows you to think of a java application in the same way to some extent as your laptop so when you're using your laptop you're editing a word document you've got a browser window open or whatever and then you can close your laptop take it to another room take it to another country, open up your laptop, and the Word document is there, and your browser window is there, and you can continue from where you were. So it's literally freezing your laptop in a moment in time, and then opening it later on. So what we're looking at with this CRaC project, CRaC as it's called, Coordinated Restore at Checkpoint, is taking the same approach for a Java application. One of the, again, performance issues that people face with Java overall, all because of this compilation that happens is what's called warm-up time. So how long it takes to identify the frequently used pieces of code, compile them through the first JIT compiler, recompile them through the second JIT compiler using more heavy optimization. Shifting that to the cloud-native compiler helps. We also have another thing called ReadyNow, which is where we can take a profile of a running application to reuse that information for JIT compilation when we start it up again. But what we'd like to do and what we are now doing is simply saying okay okay, take a snapshot of that running application so that you can restart it from exactly the same point and continue as if you just left off. And you could also take that image, move it to a different machine, start it on a different machine, start it on multiple machines. But the problem with doing that is that if you simply take a snapshot of a running application or a state, you run into problems of things if you've got an open database connection or an open file. Try and move that to another machine, try and do it an hour or two later, It's not going to work because you've lost the connection. The file may have changed, all sorts of things. So what we do is this coordinated bit, which is where we make the application aware that it's going to be checkpointed and we make it aware that it's being restored. So when you say, I want to make a checkpoint, it has to close all of those things like the database connection, the files, and so on. And then when it restarts, it says, okay, I'm restarting, establish the connection to the database, reopen the file, potentially using a checksum to check if the file has changed or not, and things like that. us to do, and I'll give you an example from our sort of benchmarks, we did a Spring Boot application and just running it from cold to start up to first transaction on the machine that we used it on, it was four seconds. And that's a sort of fairly reasonable sort of time it takes to fire up an application, get everything running. If we took a snapshot of that and we restarted it from that snapshot, we reduced that four seconds to 40 milliseconds. So if you can start startup services in 40 milliseconds rather than four seconds, you can have a huge impact in terms of your microservices and you're spinning up your instances and so on. So that's one of those things that in terms of the future is looking at things like that. The other big area that I can see that from an Azul perspective we're focusing on is the third part of our product range, which I haven't actually mentioned yet, which is what's called Intelligence Cloud. What we're doing there is we're saying we build the JVM, whether it's Platform Core or Platform Prime. So how can we in the JVM to provide value outside of that. That consists of Azul Vulnerability Detection, which is where, because we know all of the libraries and everything that's being loaded when an application runs, if you have a situation where a library is identified as having a vulnerability, and I'll give you the great example, which was Log4J. Log4J, a few years ago, had a critical vulnerability, zero-day vulnerability, that meant that you could, if somebody was using log4j there was a potential to break into systems very easily. The problem people had was how do they know where they're running Log4J? Now you can do various things like software bill of materials, SBOMs is a common technique where you list all of the libraries, all of the classes and so on, which are contained in an application. But that's a static analysis just telling you which ones could be used. What we can do by monitoring the class loader and understanding which classes are are actually being used at any given time. If a situation like that arose, you could go to our JVMs and say, show me all the JVMs that currently have Log4J loaded and are using it. So you know exactly which machines you've got to focus on to be able to address any vulnerabilities in that sense. And because we can also see all the libraries, we can give more information in that respect. The thing that we can then do is we can again invert that. And so we've come up with what what we call code inventory. Code inventory says, when you run your application, we'll keep track of all the code that you're using. If we do that, we can then identify which code is not being used. And if you've got an application that's been developed over many years, you might find that there are pieces of code that are no longer required. That's a maintenance burden. It's a security potential risk. So if we can identify those pieces, you could remove those safely and and then reduce the size of your application in terms of maintenance and security issues. And then the third thing that we've done related to that is, because we understand all the JVMs that are being run, we can then keep an inventory of those, and we can see if somebody installs a different Java version, then we can track that as well. So this is all very valuable information for people who are running a large estate with lots of JVMs in it. And I can certainly see that in the future, we're going to look at how we extend that further with more value we can add. [0:27:22] Noah Labhart: Let's switch to you, Simon. Who influences the way that you work? Name a person or many persons or something that you look up to and why. [0:27:30] Simon Ritter: There aren't that many people that I think that influence the way that I work. Although there was one person who stood out, and that was actually James Gosling. So he was the person who created Java initially. I was very lucky when I was at Sun because I worked with James quite a lot. And in fact, at one point, one of the programs that they had at Sun was what they called Sun Engineering Excellence Development. SEED. The idea behind that was that they took engineers who were in the earlier to middle part of their career to help them develop as engineers. They would assign a mentor to work with them so that they could help them develop as an engineer. So I applied for that and I was lucky enough to get accepted. And then you had to suggest people that you would work with to be your mentor. So I suggested James Gosling, thinking I'll start at the top and work my way down because I already knew him. So he said, yeah, I'll be your mentor. So I actually worked with James mentorship relationship. One of the things that I would say is that the way that he worked always impressed me because it was one of those weird things where you think there's 24 hours in a day and yet some people like James seem to get so much more done than I do. They still got the same 24 hours that I have. How do they get so much done? So I always found that an interesting sort of thing to look at. [0:28:44] Noah Labhart: Last question. So you're getting on a plane and you're sitting next to a young builder, entrepreneur, Java head, maybe Petrohead too, who knows? Maybe they're mixed in there as well, but they built the next big thing and they're excited about it. They're jazzed about it. They can't wait to show it off to the world and they can't wait to show it off to you right there on the plane. What advice do you give that person having gone down this road of building foundational elements that we all stand upon today in our software journeys? needs what do you tell them one [0:29:15] Simon Ritter: thing is don't be afraid to fail because that's clearly something that works very well if you look at the way that a lot of people have done startups and created new technology and so on don't be afraid don't be afraid to fail fast and come back and reiterate and go through a number of approaches to the same problem but temper that i would say so so don't simply go i'm just going to try everything and shotgun approach and throw everything against against the wall and see what sticks. I think you need to have that approach where you're not afraid to fail, but give it some thought before you go down different directions. And that kind of comes back to what I was saying earlier about the thing that failed for us in terms of an approach. We thought about it quite well beforehand, and we thought that had potential, because if you look at the way other languages work and other runtimes work, that definitely had potential. But once we started exploring it, then we realized that there were too many hurdles that we had to overcome. So rather than just taking the approach of, well, try everything that we can possibly think of to improve Java, we did take a more measured approach, even though some of those things don't necessarily work out every time. But don't be afraid to fail, but think about it before you start on that route. [0:30:26] Noah Labhart: I think that's fantastic advice. Well, Simon, thank you for being on the show today. Thank you for telling your creation story at Azul. [0:30:33] Simon Ritter: Thank you very much. [0:30:36] Noah Labhart: And this concludes another chapter of Code Story. Code Story is hosted and produced by Noah Labhart. Be sure to subscribe on Apple Podcasts, Spotify, or the podcasting app of your choice. And when you get a chance, leave us a review. Both things help us out tremendously. And thanks again for listening.