介绍一下我的node.js站点的处理,我的站点是没有使用nginx,使用的是varnish。因为我的项目每次deploy都会给静态文件生成一个version的后缀,因此我会让静态文件在varnish中缓存24小时(保证了如果24小时之内没有deploy,相同的静态文件只会向node.js请求一次)。 varnish的介绍可以看 https://www.varnish-cache.org/ 附上一句varnish的官方关于性能的描述:Varnish performs really, really well. It is usually bound by the speed of the network, effectively turning performance into a non-issue. We’ve seen Varnish delivering 20 Gbps on regular off-the-shelf hardware.
顺路同问!先谢一下楼下的高手!!
介绍一下我的node.js站点的处理,我的站点是没有使用nginx,使用的是varnish。因为我的项目每次deploy都会给静态文件生成一个version的后缀,因此我会让静态文件在varnish中缓存24小时(保证了如果24小时之内没有deploy,相同的静态文件只会向node.js请求一次)。 varnish的介绍可以看 https://www.varnish-cache.org/ 附上一句varnish的官方关于性能的描述:Varnish performs really, really well. It is usually bound by the speed of the network, effectively turning performance into a non-issue. We’ve seen Varnish delivering 20 Gbps on regular off-the-shelf hardware.
架设非常合理,我加nginx是因为要架多个站点,没有加前端缓存是因为站点比较小,懒得弄了 :)
@goooto http://cnodejs.org/topic/4fce14e0e5e72c25180b51d1 估计是这个原因,试试看
@hexie 非常好的文章,O(∩_∩)O谢谢!
别用forever了,用PM2吧,http://se77en.cc/2013/06/27/goodbye-node-forever-hello-pm2-translation/
我的博客就是用vps(centos + nginx + node.js + mongodb) 因为是小站,架构足矣,不过速度还是杠杠的~~~ http://www.9958.pw
我现在用的就是nginx。看来很有必要试试varnish
pm2有什么优势吗
很强大,不过还没成熟。:)