I am planning to host my website frontend and API code to cloud run. I am deploying the code via cloudbuild yml file. My concern is, I have seen that when we deploy cloud run app, and sometimes when the app crashes, it server the traffic from that revision only. Results in website downtime.
Is there any way where new revision supposes say gives error and become faulty, so cloud run didn't serve/switch traffic to that revision and rollback to previous/current working revision automatically. I know we can switch/manage traffic between revision. But is there any condition we can put like, by default it serves traffic from the latest revision but in case, the latest revision gets faulty, it sticks/switch to current working revision.
I have gone through this doc for traffic management, but it doesn't answer my question -
https://cloud.google.com/run/docs/rollouts-rollbacks-traffic-migration
I have used blue-green deployment pipeline before via jenkins, where I can put a condition, that one instance didn't start, then switch the traffic to another one.
Please suggest if it is possible or what should be the ideal process for 0 downtime in case of faulty revision automatically.