Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

190513-SpringBoot系列教程应用篇之借助Redis搭建一个简单站点统计服务 | 一灰灰Blog #11

Open
liuyueyi opened this issue Jul 14, 2019 · 1 comment

Comments

@liuyueyi
Copy link
Owner

http://spring.hhui.top/spring-blog/2019/05/13/190513-SpringBoot%E7%B3%BB%E5%88%97%E6%95%99%E7%A8%8B%E5%BA%94%E7%94%A8%E7%AF%87%E4%B9%8B%E5%80%9F%E5%8A%A9Redis%E6%90%AD%E5%BB%BA%E4%B8%80%E4%B8%AA%E7%AE%80%E5%8D%95%E7%AB%99%E7%82%B9%E7%BB%9F%E8%AE%A1%E6%9C%8D%E5%8A%A1/

判断一个网站值不值钱的一个重要标准就是看pv/uv,那么你知道pv,uv是怎么统计的么?当然现在有第三方做的比较完善的可以直接使用,但如果让我们自己来实现这么一个功能,应该怎么做呢? 本篇内容较长,源码如右 ➡️ https://github.com/liuyueyi/spring-boot-demo/tree/master/spring-case/124-redis-sitecount

@liuyueyi
Copy link
Owner Author

文中采用分段计算,判断ip是否访问过的数据模型是有问题的,比如 192.1.1.1 和 192.0.2.1两个ip访问过之后,会错误的认为 192.1.2.1 这个ip也访问过; 还没有想好更优雅的存储方式,所以稳重内容暂未更新

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant