0

I am deploying my Application on Digital Ocean and if I update my application the traffic would be interrupted. Is there a way to update the flask application without interrupting the traffic.

srishtigarg
  • 1,106
  • 10
  • 24

1 Answers1

0

A solution would be having two back-end APIs using same database.

While updating one of the APIs, you'd direct the traffic to the other API using a load balancer, a reverse proxy or whatever.

After updating one of the APIs, you can direct the traffic to the updated API and deploy the other one.

Bora
  • 1,402
  • 16
  • 19
  • That means there is no official flask functionality for this? – Ali Hussain Jan 04 '21 at 07:35
  • Correct. Although there are some ways to deploy new flask functionalities without restarting the flask instance, the easiest way is to just use two instances of same API. Another explanation of my proposed solution is here: https://stackoverflow.com/a/14441492/3124100 If availibility is a concern, you'll have more than one instances for many reasons. Also check this answer: https://stackoverflow.com/a/148102/3124100 – Bora Jan 04 '21 at 07:44