Netflix engineers share how they operationalized Java AOT compilation using Project Leyden (JDK 25) in production to reduce startup times by 15–20%. The core challenge was finding the right pipeline stage to capture AOT training recordings. They settled on canary deployments as the ideal capture point — matching production CPU, OS, JVM version, classpath, and real traffic workload. An AOT orchestrator process detects canary end via service registry deregistration, triggers graceful JVM termination to produce the AOT archive, compresses it with Zstandard (achieving ~90% size reduction), and uploads it to S3. On production startup, a downloader fetches the archive in parallel using stored byte-offset metadata to reconstruct the file, with cryptographic signing for integrity verification. A concrete example showed startup dropping from 50s to 40s (net 8s gain after 2s download overhead). Warm-up time improvements await future JDK features like cached compiled code. GraalVM native image was considered but rejected due to operational complexity across 3,000+ services and the need to preserve long-running JIT optimizations.
•49m watch time
88.9K Impressions1 Comment