Вопрос

This question talks about how you can go about storing page views, but I now have a distributed environment (multiple web servers) so the answer in that question don't seem to apply any longer.

What is the best way to capture and store page views for each page on your site in a distributed environment?

Это было полезно?

Решение

In a webfarm instead of using the default in-memory cache you could use a distributed cache such as AppFabric or memcached. Or store the results into a database.

Другие советы

Consider using Ajax post call to the web server. Data can be stored in any storage device such as windows azure storage, sql azure or any database, something similar to the following:

<script>
    document.ready(function() { $ajax.post("server url")})

In server url manage to write the count entry in storage.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top