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.
Asked
Active
Viewed 277 times
0

srishtigarg
- 1,106
- 10
- 24

Ali Hussain
- 3
- 3
-
Please provide a minimum reproducible example. – srishtigarg Jan 04 '21 at 07:10
1 Answers
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
-
-
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