/plushcap/analysis/fly-io/print-on-demand

Print on Demand

What's this blog post about?

This post discusses an alternative approach to scaling applications by decomposing parts into event handlers and using appliance machines to allocate resources only when needed. The focus is on generating PDFs from web pages, which can be resource-intensive. By separating this task into a separate application, memory usage becomes more predictable, and the memory required for PDF generation will only be allocated when necessary. This approach allows for scaling separately and provides faster start times for applications. The implementation details involve using Fly.io's primitives to handle machine allocation and auto-stop settings in fly.toml. The author suggests considering this pattern for other resource-intensive tasks within an application, such as streaming audio/video files or AI processing.

Company
Fly.io

Date published
Nov. 29, 2023

Author(s)
Sam Ruby

Word count
895

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.