High Performance Serverless Functions in Scala
summary
Compiles vanilla Scala fat jars with SBT assembly into native Linux executables via GraalVM native-image (built in Docker), deploys those to AWS Lambda custom runtime behind API Gateway or SQS, and avoids JVM cold starts by removing runtime reflection and packaging CA certs and libsunec. Results: cold starts mostly under 250 ms, warm responses about 50–80 ms, typical Slack callback finishes ~80 ms so billing rounds to 100 ms. Uses minimal libs (Apache HTTP Components, JSON Eider, AWS Java SDK) and works for low-cost, snappy serverless APIs.
AI-written summary · about
chapters (8)
- 0:00Introduction to talk
- 1:30Vanilla Scala and GraalVM
- 3:40Problem with JVM on Lambda
- 8:40Introducing GraalVM
- 13:25Performance with GraalVM
- 17:01Vanilla Scala with GraalVM
- 17:26Speaker introduction
- 18:30Q&A session
related talks
39mRunning Scala on AWS Lambda as a native-image
53mHigh performance Serverless Java on AWS
56mThinking in Serverless Java (Code)
51mAdapting Java for the Serverless world!
01h 03mServerless 2049
36mServerless Java
52mServerless Java with Spring
46mThawing Java on AWS Lambda Reducing Cold Start Times from 11 Seconds to 1
