Presentation: Fearless AWS Lambdas
What You’ll Learn
- Gain practical knowledge about experiences running JVM-based Applications on AWS Lambda.
- Learn about some of the performance numbers and metrics captured from running on a serverless platform.
- Understand best practices and hear recommendations on how to effectively leverage cloud serverless function.
Abstract
The modern Java Virtual Machine (JVM) is the culmination of millions of hours of expert engineering, and is the foundation on which enormous portions of the digital landscape are built. However, as a runtime for AWS Lambda functions, the JVM is often derided as being a poor fit for an ephemeral world. The truth of the matter is that the JVM is an excellent choice of runtime for a wide range of AWS Lambda use cases, and developers need not even constrain themselves to just the Java language to use it.
In this talk, John Chapin gives an overview of the JVM runtime for AWS Lambda, as well as a comprehensive look at JVM-based Lambda performance across a range of use cases. He outlines a set of criteria to help architects and engineers decide whether or not to choose the JVM over the other runtime options. He also gives strategies, tips, and examples for developing efficient, performant AWS Lambda functions in a variety of JVM languages, including Java, Clojure, and Scala.
Interview
John: You have to be very cognizant of the cold-start initialization behavior of your application (and the underlying runtime) versus the warm-start behavior of your application (and that runtime).
Both the beauty (and the challenge) of a platform like Lambda is you give up control. As we moved along this path, where we went from running on premise (where we did everything from bare metal on up) to a managed functions as a service platform, we're losing dials and losing opportunities to control the behavior of the runtime. So with Lambda, we only have a couple of knobs left to turn to adjust the behavior of the runtime. The thing that affects Java the most is of course artifact size.
As Java developers, we are used to just plugging the library that we need into a pom file, and it downloads. So I go into some detail about how to be circumspect and conscious of your application dependencies.
John: The good news is that the platform itself only undergoes cold starts when it needs to create a new container. For example, like the first time you run your Lambda, reconfigure your lambda, or maybe when you scale out, you will see it. What we see (and we have a lot of data on this) is that it tends to be four to six hours before you have to have a cold start.
[If you're running a fairly regularly invoked lambda function (and not having a ton of failing behavior), you may only actually pay that cold start penalty a few times a day. If you're doing something in the execution of your Lambda function that's even marginally complex, this is usually enough to see the performance of the JVM drastically exceed that of a Node or Python. By the way, I'll caveat that statement by saying Python not using some of it's C/native library stuff. So so do the math. We'll talk about how to do that and how to go into some detail about how the benchmark standards because the platform is very very hard.
John: You have you have no control over any of the runtime parameters of the JVM, other than you can set the memory allocated for a Lambda and the max heap for the JVM is 85 percent of that.
Similar Talks
Tracks
Monday, 26 June
-
Microservices: Patterns & Practices
Practical experiences and lessons with Microservices.
-
Java - Propelling the Ecosystem Forward
Lessons from Java 8, prepping for Java 9, and looking ahead at Java 10. Innovators in Java.
-
High Velocity Dev Teams
Working Smarter as a team. Improving value delivery of engineers. Lean and Agile principles.
-
Modern Browser-Based Apps
Reactive, cross platform, progressive - webapp tech today.
-
Innovations in Fintech
Technology, tools and techniques supporting modern financial services.
Tuesday, 27 June
-
Architectures You've Always Wondered About
Case studies from the most relevant names in software.
-
Developer Experience: Level up Your Engineering Effectiveness
Trends, tools and projects that we're using to maximally empower your developers.
-
Chaos & Resilience
Failures, edge cases and how we're embracing them.
-
Stream Processing at Large
Rapidly moving data at scale.
-
Building Security Infrastructure
How our industry is being attacked and what you can do about it.
Wednesday, 28 June
-
Next Gen APIs: Designs, Protocols, and Evolution
Practical deep-dives into public and internal API design, tooling and techniques for evolving them, and binary and graph-based protocols.
-
Immutable Infrastructures: Orchestration, Serverless, and More
What's next in infrastructure. How cloud function like lambda are making their way into production.
-
Machine Learning 2.0
Machine Learning 2.0, Deep Learning & Deep Learning Datasets.
-
Modern CS in the Real World
Applied, practical, & real-world dive into industry adoption of modern CS.
-
Optimizing Yourself
Maximizing your impact as an engineer, as a leader, and as a person.
-
Ask Me Anything (AMA)