in reply to IIS Restart

Hi, It seems to be very useful. But i am not good in perl and wanted to know how can we arrange these script setup to work perfectly on the server. So that we won't get any outage. Thank for you help!

Replies are listed 'Best First'.
Re^2: IIS Restart: 14 years after..
by Discipulus (Canon) on Sep 28, 2015 at 08:26 UTC
    it is not very useful. Maybe 14 years ago it was.

    Anyway if you are interested on the matter, please follow the Corion's advice about the overall design of a web infrastructure.

    Fore the mere restart of an IIS instance you just need one command.
    iisreset [computername] /RESTART Stop and then restart all Internet services. /START Start all Internet services. /STOP Stop all Internet services. /REBOOT Reboot the computer. /REBOOTONERROR Reboot the computer if an error occurs when st +arting, stopping, or restarting Internet services. /NOFORCE Do not forcefully terminate Internet services +if attempting to stop them gracefully fails. /TIMEOUT:val Specify the timeout value ( in seconds ) to wa +it for a successful stop of Internet services. On exp +iration of this timeout the computer can be rebooted i +f the /REBOOTONERROR parameter is specified. The default value is 20s for restart, 60s for +stop, and 0s for reboot. /STATUS Display the status of all Internet services. /ENABLE Enable restarting of Internet Services on the local system. /DISABLE Disable restarting of Internet Services on the local system.
    This command i think it ship with every installation of the headache-generator-webserver (Aka IIS) from times of Winnt and is still valid with IIS 7.5. The command can operate also on a remote machine.

    L*
    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re^2: IIS Restart
by Corion (Patriarch) on Sep 28, 2015 at 08:09 UTC

    The traditional approach to zero-downtime restarts is to spin up a secondary server and have something like Server::Starter or HAProxy in front of your servers. Then, you tell one of your servers to gracefully spin down by processing all requests that are still in flight while already telling your proxy not to send new requests to that server instance. Once the instance has gone idle, you restart it and reconnect it to the proxy.

    I don't work with IIS so I don't know if there is a built-in mechanism for that, but as long as you have multiple (virutal) machines behind a proxy, you can use the technique even without server support.