Next-Gen PDF Rendering: Scaling to 1 Million Documents in 10 Minutes with Serverless Rust

code red code red

Generating documents at scale is a common but deceptively complex challenge, especially in regulated industries like finance where millions of reports are required within tight time windows. A naive approach of throwing thousands of vCPUs at the problem is not only prohibitively expensive but often fails to scale gracefully. This session presents a real-world case study on how we architected a PDF rendering pipeline to generate 1 million documents in under 10 minutes for under a dollar, a 95% cost reduction compared to conventional cloud-native solutions.

We'll dive deep into the architecture of a fully asynchronous, event-driven pipeline in the cloud, all managed with Terraform. The core of our solution ditches slow, memory-hungry engines like Puppeteer or LaTeX in favor of Typst, a modern, high-performance typesetting system. By harnessing its speed within a native Rust Lambda function, we eliminated runtime overhead and achieved hot-invocation processing times of < 40ms per document.


Speaker

Erik Steiger

Software & AI Consultant | Entrepreneur | Previously Tech Startup Founder, Consultant @Netlight | Helping AI Startups Get Access to GPU Compute

Erik is a senior software and AI engineer. He previously served as a technical founder for startups in manufacturing and music tech. During his time as a technical consultant at Netlight, he worked on various projects from IoT solutions for energy startups to legacy COBOL systems for banks. Currently, Erik is collaborating with startup accelerators to give AI startups access to GPU compute resources. On the side, he likes writing about tech topics and hacking on open source projects.

Read more