0

I am running a php-mysql-based web application with around 1K traffic/day on compute engine and its database is on Google SQL. I am not a techy person but managed to come this far by learning by ears with bunch of YouTube videos - thx to those experts sharing all the steps.

As the traffic increases, we have decided to upgrade our look and feel of the website which would definitely involve files modification and its DB as well but we have been looking for any possible solution to upgrade it without bringing the website down, from there I got to know about CICD concept.

With my little understanding, Google load balancer can control the traffic to designated prepared instances as we want and I see that SQL (database) can be replicated each other automatically (please correct me if I am wrong)

This got me to think, what if we can isolate 1 instance for the developers/designers to start making code changes/design while the rest of whole world can go to other instances? and upon the changes are done, switch the traffic the other way and synch with master database... no downtime and new design and code are up and running. Happy ending. :-)

I guess this is just a hypothetical idea with my little experience. My question to the experts here is...

  1. is this idea possible/making sense?
  2. if so, has it been done by anyone? if so, any reference?
  3. if there is no reference (which I could not find much), can anyone help spell out what things are possibly needed to realize this idea?
  4. if you have no idea of #3, any particular term I might need to use to search further?
  5. if this idea is not possible, is there any other solutions available out there you know?

Please shed some light here with your expertise. Thank you in advance.

futureyoon
  • 67
  • 1
  • 7

1 Answers1

0

The question is too general to provide an exact answer.

HTTP Load Balancer can redirect ingress traffic to the configured backends based on the content, load/utilization and health state. It is not likely you might use it to route traffic to a specific backend voluntarily.

For Cloud SQL you should take into account that it can only replicate a single master to one or more read-only replicas. See Replication options .

If you're interested in reducing downtime, GKE and a Blue-Green deployments approach could be applicable in this case. The deployments are accessed via a Service which acts as the router. Once the new "Green" version is up and running, you could redirect traffic to it by updating the Service. A downside of of this approach is that you will need to have at least 2x the resources in the GKE cluster necessary to host your application.

mebius99
  • 2,495
  • 1
  • 5
  • 9