We created a deployment pipeline to deploy our web-site to remote servers.
We used psexec.exe to control iis remotely. This works fine.
I will explain our load balancer logic.
We are hosting our web-site after a load balancer. Load balancer looks every server and reads a text file. If text file includes "abc" it sends requests to that server. If text file includes something different it doesn't send.
I seperated my servers virtually. I always have half running servers.
I follow these steps to in first part to copy new code to web-site:
- Change load balancer file content to something different ex:"cde"
- Wait 15 seconds
- PsExec.exe stop site (I'm having 404 errors now)
- PsExec.exe stop apppool
- Wait 15 seconds
- Copy new files to site folder
- PsExec.exe start apppool
- PsExec.exe start site (No 404 Errors any more)
- Wait 5 seconds
- Change load balancer file content to "abc"
When i stop the web-site, load balancer can't read the file and sends requests to closed site and it gives 404 ERROR, until the opening web-site!
My question is:
- Do we need to stop site to copy new files?
- What is the difference between stopping app-pool and stopping-site while copying files?
- If i need to stop site, do you have any suggestion to load balancer requests?
Thank you.