for an asp.net-mvc website, how to capture page views in a distributed enviroment?

StackOverflow https://stackoverflow.com/questions/9957151

  •  28-05-2021
  •  | 
  •  

سؤال

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