Grokking ExpressJS
Vote

0% completed

​

Streams in Express Apps

Ten clients downloading a 6 MB export at the same time can cost an Express app about 60 MB of memory, or only a few small buffers. The difference lies in how the app sends the file: whole, after reading all of it into memory, or in small pieces while the client receives it.

Sending data in pieces is the job of a stream. Streams handle data too large to hold in memory at once, in both directions: a big export going out, and a big upload coming in. They do not come from Express. They are part of Node.js, and Express works with them because its req and `res

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content