0

In development I used to have my Node server serve my static files (img, pdf, etc.) but as production is getting closer, I feel it is very inefficient and puts an unneeded load on Node.
What is the right way to have my assets served by a different server? Is there a ready-made solution? Should I use a "good old" Apache-PHP stack? What should I know about ports forwarding and stuff like that?

Thanks a lot!

4

1 回答 1

2

我已经看到这有几种方法。

  1. 使用Nginx提供静态资产。静态资产比 Apache 快。
  2. 使用S3Cloudfront提供静态资产。您将资产上传到 S3 并使 Cloudfront 成为 CDN。
  3. 使用Cloudflare,我对这种方法的经验较少,所以不能告诉你太多接受他们处理 CDN 并且我相信一些缓存。

希望这可以帮助。

于 2013-08-19T18:56:13.863 回答