sae上http输出流量特别大有没有办法改善

#1 hongrui

个人小站 [url]www.shtan.org[/url]  日ip100左右uv250左右,每天要用近300豆,主要浪费在 http流出流量 与 mysql 请求次数上。

目前已进行的优化有:

'function_access' => array(
             array("spAccessCache", "saememcache"),
         ), 这个已开启

appconfig 设置

- errordoc: 404 /404.html
- rewrite: if(!is_dir() && !is_file()) goto "index.php?%{QUERY_STRING}"
- expire: if (path ~ "\.js$") time 86400
- expire: if (path ~ "\.css$") time 86400
- expire: if (path ~ "\.(jpg|gif|png)$") time 86400
- compress: if ( out_header["Content-Length"]>=50) compress
- compress: if ( out_header["Content-type"]=="text/css" ) compress
- compress: if ( out_header["Content-type"]=="text/javascript" ) compress
- compress: if ( out_header["Content-type"]=="text/html" ) compress
- compress: if ( out_header["Content-type"]=="image/png" ) compress
- compress: if ( out_header["Content-type"]=="image/jpeg" ) compress
- compress: if ( out_header["Content-type"]=="image/gif" ) compress
- compress: if ( out_header["Content-type"]=="text/plain" ) compress
- compress: if ( out_header["Use-Compress"] == "1") compress

<{include file="header.html" cache_liftetime=3600}> 这里也加了缓存

jake 还有什么地方可以优化吗??



2015-02-06 09:49:13

#2 jake

图片什么的流量,可以考虑用什么七牛存储那种。mysql只能加缓存。

另外页面压缩搞过了吗?

2015-02-06 10:56:48

#3 hongrui

页面压缩 做了

2015-02-06 11:00:59

#4 jake

mysql来说就没什么太好的办法,毕竟读写多少都是业务需要的。只能是加个memcache缓存之类的,SAE不能用文件缓存。

先把图片什么的转移一下吧,估计可以节省不少带宽了。

2015-02-06 11:24:46

#5 hongrui

找到http输出流量大的原因了,百度蜘蛛不停地抓取

2015-02-06 15:51:03

#6 vodo

这个你应该上百度搜搜看看

2015-03-11 23:11:33