2

I have a Web site (IIS, Windows Server 2008) where users are constantly adding information to their pages.

How can I know that there currently are users working on my site?

How can I update the site without interfering with the users's activities?

Flot2011
  • 123
  • 4
  • Is this old StackOverflow answer any help? [How can I determine the number of users on an ASP.NET site (IIS)? And their info?][1] [1]: http://stackoverflow.com/questions/155593/how-can-i-determine-the-number-of-users-on-an-asp-net-site-iis-and-their-info – Gregg Browinski Dec 03 '12 at 16:01
  • Sorry, no ASP.NET here. – Flot2011 Dec 05 '12 at 08:40
  • How are users adding information? Are they internal users adding to HTML files directly from the Windows Shares, or do you have some sort of CMS installed? What kind of update are you trying to do? Many HTML type updates can be done live, but updates to core objects or the Operating System will almost always involve a maintenance window. – BillN Dec 28 '12 at 16:43
  • Basically, you don't. You schedule a maintenance window large enough to perform the upgrade, let your users know in good time that it's coming, and try to ensure that your upgrade workflow is smooth enough that you can confidently stop the service for this period. The main reason for doing it this way is that you *really* don't want requests coming in while you're half way through replacing the application stack; it's a great way to corrupt your database. – SmallClanger Dec 28 '12 at 16:55

2 Answers2

2

How can I know that there currently are users working on my site?

Open perfmon. Add Web Service -> Current Connections counter. Use other counters such as Current Anonymous Users as appropriate.

How can I update the site without interfering with the users's activities?

That depends entirely on what exactly you're updating and the nature of your website. You may not be able to update it without disrupting user sessions. Schedule maintenance.

Another good strategy is to have a duplicate web server. Have both web servers behind a load balancer. Take one web server out of the load balancer rotation. Wait for user connections to bleed off of it. Update it once no one is on it any more. Put it back on the load balancer. Repeat for other web server.

Ryan Ries
  • 55,011
  • 9
  • 138
  • 197
-1

Well I can't speak to how you can update your site without interrupting your users sessions, however I can tell you that WireShark will definitely help you track down who/what/where users are on your site at any given moment.

http://www.wireshark.org/

  • 4
    That's like using a microscope to see if someone has a broken leg. Yes, it may eventually tell you that, but it's the wrong tool for the job. – Magellan Dec 28 '12 at 16:42
  • How so, he asked how he could see if users were currently using the site- Wireshark does this if you create a simple filter. – bradleyflynn Dec 28 '12 at 16:44
  • Yes, you can use Wireshark for that. But there are tools that will do the job with much less work, including the web service's own logging and perhaps even the site's own logging mechanisms written into the code. And as professional sysadmins, we have an obligation to use the most efficient tool in our set and recognizing the difference between "Can" and "Should". – Magellan Dec 28 '12 at 16:51
  • Sure, you could watch port 80 traffic, but any public site is going to have consistent stream of tests, crawlers and general background radiation that it will always appear to be 'in use', unless you're a quick enough reader to be able to distinguish that stuff from genuine user traffic. – SmallClanger Dec 28 '12 at 16:59