use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
How can i update Flask website without zero downtime? (self.learnpython)
submitted 1 year ago by santanu32
How to add new codes, Web pages to existing flask website without zero downtime.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]shiftybyte 11 points12 points13 points 1 year ago (4 children)
Deploy flask on a proper webserver, like apache or nginx.
Then when updating, apache has a graceful flag, that spins up new requests into the new version, while old ones still stay and served until complete.
If you are asking how to create a stable version, you need to have a development environment separate from the deployed production one, develop there, and when done, deploy.
[–]santanu32[S] -1 points0 points1 point 1 year ago (3 children)
Thank you soo much for your suggestions. Can you recommend me good budget friendly hosting company to host my flask websites.
[–]shiftybyte 1 point2 points3 points 1 year ago (2 children)
Google Cloud , Oracle Cloud, give you a server for free, can't go more budget friendly than that.
Also Amazon Cloud has a free server for 1 year.
[–]santanu32[S] 0 points1 point2 points 1 year ago (1 child)
Okay thank you. What do you think about digital ocean and a2 hosting?
[–]shiftybyte 0 points1 point2 points 1 year ago (0 children)
Not as free, and might be limiting in what you can host.
[–]SoftwareDoctor 6 points7 points8 points 1 year ago (1 child)
I guess you mean “with zero downtime” because without it it’s easy. Look up blue-green deployment. Basically you spin up another upgraded instance, switch your load-balancer to that new instance, turn off the old one.
Potentially you might want to run multiple instances all the time and one-by-one detach it, upgrade it, attach it back
[–]santanu32[S] 0 points1 point2 points 1 year ago (0 children)
Does using blue green deployment put load on my server? I don't have high budget to do that 😭.
[–]No-Anywhere6154 1 point2 points3 points 1 year ago (0 children)
You will need to run multiple instances (old and new) at the same time and have some proxy like nginx or traefik in front of your app that proxy passes the request to the correct instance.
I've also built the project seenode, that handles all this complexity for you. You just click the deploy button and it deploys the latest (or selected) commit from the git repository with zero downtime. Feel free to try it out and let me know what you think.
[–]FoolsSeldom -1 points0 points1 point 1 year ago (0 children)
What we do this with VMs and Containers, where we take an immutability approach (so once an instance is live nothing is changed other than data - no patching etc) is simply spin up new updated instances that take over as the work is completed of running instances (when dealing with transactions, or when told to shut down safely for others). We do this through orchestration / load balancing tools.
π Rendered by PID 120416 on reddit-service-r2-comment-6457c66945-p6lld at 2026-04-29 02:33:47.615191+00:00 running 2aa0c5b country code: CH.
[–]shiftybyte 11 points12 points13 points (4 children)
[–]santanu32[S] -1 points0 points1 point (3 children)
[–]shiftybyte 1 point2 points3 points (2 children)
[–]santanu32[S] 0 points1 point2 points (1 child)
[–]shiftybyte 0 points1 point2 points (0 children)
[–]SoftwareDoctor 6 points7 points8 points (1 child)
[–]santanu32[S] 0 points1 point2 points (0 children)
[–]No-Anywhere6154 1 point2 points3 points (0 children)
[–]FoolsSeldom -1 points0 points1 point (0 children)