关于页面pv统计的问题

WBOY
Release: 2016-06-23 14:05:59
Original
863 people have browsed it

要统计页面的pv,是直接更新数据库的pv字段,还是先在memcache里面的记录,再定时更新到数据库?


回复讨论(解决方案)

都差不多

不过
流量小的话从memcache过渡,显得很傻
流量大的话,应付流量需要大量内存,memcache分得的内存也没多少,还是要频繁写库

如果 memcache 置于独立服务器中,那似乎也没有写库的必要了

都差不多

不过
流量小的话从memcache过渡,显得很傻
流量大的话,应付流量需要大量内存,memcache分得的内存也没多少,还是要频繁写库

如果 memcache 置于独立服务器中,那似乎也没有写库的必要了
流量不小,memcache的内存也够用,存pv数据,都是很小的。我是怕在流量高的时候,连接memcache太频繁,会不会扛不住。

既如此,你自己不是已经有答案了吗

既如此,你自己不是已经有答案了吗
没有啊,我就是不确定,像pv统计这样的功能,是用mysql好,还是memcache好~

额,没人回答了么~算了,结贴吧,看来都没兴趣啊。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!