Hello,
Our dev team has grown, and we now deploy more frequently. On the other hand, our site has grown too, and downtimes are becoming less acceptable.
My goal is to let us keep deploying frequently and at any time during the day without risking server downtime.
The solution I've gathered from reading around is to have the codebase deployed on two servers, A and B. While traffic is directed to server A, we push new code to server B and restart it. Once it's back online, we transfer traffic to server B. On the next update, we'll push new code to server A instead, and do the same thing.
Is that a good way to go ?
How would I set that up in PythonAnywhere ? With two web apps connected to the same database ? Can I programmatically change which web app receives traffic from my domain, so I can automate the whole process ?