> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/hosting/scaling/binary-data.md).

# Handle binary data in Duaer

How to handle large files without degrading Duaer’s performance.
## Use filesystem or database, not memory

When a node produces a file, Duaer writes the bytes to configured binary storage and leaves a reference on the execution. Later nodes read the bytes when needed. The heap does not have to hold every attachment at once.

In-memory mode is marked removed in both the 2.0 and v3 checks. An instance still set to memory mode fills the heap with large files. Multi-process deployments need storage all processes can read.

In queue mode prefer database mode; do not rely on one container’s temporary disk alone. Refer to [environment variables](/hosting/configuration/environment-variables.md).
## Questions

### Does Duaer keep binary data in memory?

Not by default. It writes to the filesystem or database and keeps a reference on the execution. In-memory mode is removed.

