I started learning NodeJS, and streams seems to be something that people use a lot. In most of the documentation that I had read there are mentions of the "back-pressure problem" that occurs when you are processing big sized files but I haven't found a clear explanation of what exactly this problem is. Also I have read that using pipes can help with this problem, but how exactly do pipes fix the back-pressure problem?
Thanks for any explanation in advance.
readStream.pipe(writeStream)
. Back pressure is when thewriteStream
is unable to consume the data as quickly as thereadStream
is pushing data to it. This article does a decent job of explaining the issue and how you might handle it. – Ordonez