简体   繁体   English

如何在分布式环境中的Web应用程序中查找网页的命中数

[英]How to find number of hit counts of a web page in web application in distributed environment

This question is specifically targeted for tracking number of hits of a web page when an application is deployed in distributed environment. 当在分布式环境中部署应用程序时,此问题专门用于跟踪网页的点击次数。 I am aware that we can track number of hits either by using filter or interceptor (considering app has been built using spring framework) but I'm not able to figure out how can we track request if webApp is deployed in more than one application server. 我知道我们可以通过使用过滤器或拦截器来跟踪命中数(考虑到应用程序是使用spring框架构建的),但是我无法弄清楚如果webApp部署在多个应用程序服务器中,我们如何跟踪请求。

You can store hit counts in database. 您可以将命中计数存储在数据库中。 Database should be shared among the distributed web servers or you can use shared redis caches. 数据库应该在分布式Web服务器之间共享,或者可以使用共享的Redis缓存。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM