RainingChain
RainingChain

Reputation: 7746

Host and Deliver Big Files on Nodejs Nodejitsu

I have a website hosted on Nodejitsu using Nodejs.

I want people to be able to download files. Overall, there are about 1k files of 1MB each for a total of 1GB. Those files are in the same directory than regular code.

When I try to deploy, there's the message: "Snapshot is larger than 70M!"

How are you supposed to deliver files with Nodejs? Do I need to host them on a separate website (ex: mediafire) and I redirect people there? Or is there a special place to put them?

Upvotes: 0

Views: 124

Answers (1)

Brad
Brad

Reputation: 163272

Services like Nodejitsu are meant for hosting your application. It sounds like these are static files, not something generated by your application. I recommend putting these on a CDN if they will get a lot of traffic. CloudFront can easily sit out in front of S3. Otherwise, buy a cheap VPS and dump your files there.

I also recommend not using your application server (your Node.js server) to host static content. While it can certainly do this, software like Nginx is often faster. (Unless of course you have a specific reason to serve these from your application...)

Upvotes: 0

Related Questions