Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

My company has an e-commerce website which I constantly keep updating the website for.

The problem is whenever I push out some stuff to the live site, like user controls page, the Application Pool gets recycled and website gets recompiled, and the customers who were already on the site experienced delays and/or see errors on the site.

How do I prevent such bad user experiences and/or possibly losing customers? I am using C# and IIS 7.

share|improve this question
    
This won't work for page layout changes, but if you're just changing/adding product names, descriptions, prices, etc, move that info to a database if isn't already so you can update the DB without deploying code updates. –  joshuahedlund Jul 31 '13 at 20:50
add comment

3 Answers

up vote 0 down vote accepted

I use load balancing to prevent errors and keep the site up during updates. For this to work you need at least two servers behind a load balancer that sends traffic to whichever server is up. My procedure for updating my sites is:

  1. Tell "Server A" to start serving an error page at the URL that the load balancer pings. This tells the load balancer to stop sending traffic to this server.
  2. Wait 30 seconds or so until traffic stops hitting the server.
  3. Update the code on this server.
  4. Tell the server to stop serving an error page at the ping URL.
  5. Wait until that server is getting traffic again.
  6. Repeat steps 1-5 with "Server B".
share|improve this answer
    
Unfortunately we can't afford to buy another server at the moment, but this is the answer I was looking for! –  Superman Coding Aug 1 '13 at 21:47
add comment
  1. Don't deploy when the site is live. You should take down the site so no users are active at the time of deployment. If your site is very active advanced notice of downtime is usually encouraged. Also, when the site is down, be sure to have a notice up stating why the site is down and when it is expected to be back up.

  2. Don't deploy during active periods of site usage. Deployments should occur late at night when site usage is at a minimum. No one likes to work after hours but this is part of how code rollouts work.

share|improve this answer
add comment

Specific to your IIS environment:

You could consider creating a new application pool for your changes, as covered here:

The element contains configuration settings for all application pools running on your Internet Information Services (IIS) 7 server. An application pool defines a group of one or more worker processes, configured with common settings that serve requests to one or more applications that are assigned to that application pool. Because application pools allow a set of Web applications to share one or more similarly configured worker processes, they provide a convenient way to isolate a set of Web applications from other Web applications on the server computer. Process boundaries separate each worker process; therefore, application problems in one application pool do not affect Web sites or applications in other application pools. Application pools significantly increase both the reliability and manageability of your Web infrastructure.

And then remove the older application pool at a later time to increase server performance.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.