Topic: Google Cloud Database Engineer topic 1 question 10

Your team recently released a new version of a highly consumed application to accommodate additional user traffic. Shortly after the release, you received an alert from your production monitoring team that there is consistently high replication lag between your primary instance and the read replicas of your Cloud SQL for MySQL instances. You need to resolve the replication lag. What should you do?

A.
Identify and optimize slow running queries, or set parallel replication flags.
B.
Stop all running queries, and re-create the replicas.
C.
Edit the primary instance to upgrade to a larger disk, and increase vCPU count.
D.
Edit the primary instance to add additional memory.

Re: Google Cloud Database Engineer topic 1 question 10

Other options don't directly resolve the issue. B is the worst answer since it disrupts the whole read setup.

Re: Google Cloud Database Engineer topic 1 question 10

Definitely A.

Re: Google Cloud Database Engineer topic 1 question 10

Definitely A.

Re: Google Cloud Database Engineer topic 1 question 10

A. Optimize query for resolve replication lag. Docs: https://cloud.google.com/sql/docs/mysql/replication/replication-lag#optimize_queries_and_schema

Re: Google Cloud Database Engineer topic 1 question 10

I would have thought that recreating your replicas should be a standard action as part of a major client software release - especially one that potentially makes structural changes to the DB, as implied by the description here.

Option B seems to me like the most effective solution in this scenario, as well as the simplest.

Re: Google Cloud Database Engineer topic 1 question 10

A.
High replication lag is caused when the write load is too high for the replica to handle. Other causes include slow running queries on the replica, tables not having PKs thus forcing FTS, queries like DELETE…WHERE. Possible solutions are configure parallel replications, increase the size of the replica, send read traffic to the read replica, index the tables, identify and fix slow write queries, recreate the replica. To increase the throughput of replication increase the flag slave_parallel_workers. B is possible but should not be the first option. C and D add resource but don’t fix the issue. As others have said, the issue could be network related and additional traffic is mentioned in the question. A is still the best answer.

Re: Google Cloud Database Engineer topic 1 question 10

A. But in reality, none.  You need to analyze the root cause. Network connection latency or bandwidth might be relevant too.

Re: Google Cloud Database Engineer topic 1 question 10

It's true, none options seems to be right here because you need to analyze everything first.

Re: Google Cloud Database Engineer topic 1 question 10

Vote for A

Re: Google Cloud Database Engineer topic 1 question 10

Vote for A

Re: Google Cloud Database Engineer topic 1 question 10

A: Identify and optimize slow running queries, or set parallel ***** replication flags.

Re: Google Cloud Database Engineer topic 1 question 10

A & C is correct but A is the best answer

Re: Google Cloud Database Engineer topic 1 question 10

correct answer - A
https://cloud.google.com/sql/docs/mysql/replication/manage-replicas#:~:text=Replication%20lag%20is%20consistently,Find%20and%20fix%20them.