How to configure backups to reduce inter-zone traffic (and hence reduce related costs on cloud provider)


I am using pxc-operator of version 1.11.0. Running databases of version 5.7. Some DBs are quite big. When performing full backups, pods that are responsible for this connect to random DB node, create backup and upload it to block storage. But backup creating pods can be assigned to the node on different AZ than DB pod that is being used as a source. Eventually, gigabytes or even terabytes of data is transferred from one AZ to another and if it happens on a daily basis, it significantly affects costs.

So, when performing full backups I would like to control from which DB node source data is taken for backup and prevent inter-zone data transfer. Is it possible? How can I achieve such scenario?

Just in case, I already know that it is possible to put podAffinity to backup creating pods, but it won’t work anyway, because source DB is chosen randomly, i.e DB pod from another AZ can be chosen.

Here is a simple scheme of what is happening now:
AZ-1-backup-creating-pod → AZ-2-db-pod (source in a different AZ)

What I want to happen:
↑ (source in the same AZ)
AZ-1-backup-creating-pod AZ-2-db-pod

1 Like

Hey @Nurbek_Turdaliev ,

I understand the problem. Right now I don’t think there is a clean solution.
Let me discuss it with the team. Which cloud do you use?

Hi @Sergey_Pronin! Thank you for the support!
I am using AWS.