Deploy Django Application without Service Interruption / no Downtime Deploy Django Application without Service Interruption / no Downtime postgresql postgresql

Deploy Django Application without Service Interruption / no Downtime


In the case that you have no schema migrations, I'll give you a practical scenario:

Keep two versions of django processes ( A and B ), which you control with, let's say, supervisor. Keep an nginx process in front of your django processes, which forwards all requests to A. So, you upload version B to the server, start the django process B with supervisor, then change your nginx's conf file to point to B, then reload your nginx process..

In the case that you have schema migrations, things get complicated. Your options include:

  • You could consider using a NoSQL solution, like mongoDB (in this case you can keep a single DB instance).
  • Figure out how to manually record all write requests while uploading, as to push them later to your new database.