1

Actually i have a website hosted on my server, every time when I upload changes using FTP website breaks for some time until my uploading get finished.

I do not want to break by website even while updating it.

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
  • 1
    Are you using IIS? If so, you can use app_offline.htm-file to display a message to users while updating. See: https://stackoverflow.com/questions/1153449/asp-net-2-0-how-to-use-app-offline-htm The app itself will still restart due to update though. – Esko Feb 21 '19 at 12:07
  • Upload to a new folder on the server. Configure IIS to point to the new folder rather than the old server. Alternatively, deploy to a different server and use a load balancer to switch between the servers. – mjwills Feb 21 '19 at 12:08
  • This is not possible. – Uwe Keim Feb 21 '19 at 12:08
  • @mjwills Still breaks the application as sessions become obsolete, users get logged out, etc. – Uwe Keim Feb 21 '19 at 12:09
  • @UweKeim That is a large assumption. For example, you are assuming that sessions are used **and** in-memory. That is not true for any website I've ever worked on. – mjwills Feb 21 '19 at 12:10
  • Two colliding anecdotal evidences , @mjwills – Uwe Keim Feb 21 '19 at 12:11
  • 1
    @UweKeim You said something was **not possible** and that it would break the application. You used absolute language - as if that was the only possibility. I only need to present one counter-example to show that that absolute statement is not true. :) – mjwills Feb 21 '19 at 12:12
  • @vinod I gave you two options. There are many ways to solve this. Google `blue green deployments` as an example. – mjwills Feb 21 '19 at 12:12
  • We do it the following (through automated scripts): 1. Upload from dev to TEMP folder on production. 2. clear REAL folder on production, 3. move from TEMP folder to REAL folder on production. This minimizes the downtime to (relatively fast) local operations of copying files locally. – Uwe Keim Feb 21 '19 at 12:12
  • 1
    That is a good approach for sure @UweKeim. You can even consider changing IIS to point to the new folder to remove the need for step 3 and to delay step 2 until after the new site is live. – mjwills Feb 21 '19 at 12:14
  • @UweKeim Is that not a redundant procedure if you just enable "Precompile during publishing"? Seems like reinventing the wheel to me... – Esko Feb 21 '19 at 12:14
  • @vinod You may wish to consider using something like https://octopus.com/ rather than FTP. https://octopus.com/docs/deployment-patterns/rolling-deployments https://octopus.com/docs/deployment-patterns/blue-green-deployments – mjwills Feb 21 '19 at 12:17

1 Answers1

1

There is another approach for this case.

ELB + (Server A, Server B...)

In this architecture,you can route all the requests to B while deploying code to A. Then route all the requests to A and deploy code to B.

Achilles
  • 30
  • 1