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

Hello,

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-db-pod
AZ-1-backup-creating-pod → AZ-2-db-pod (source in a different AZ)

What I want to happen:
AZ-1-db-pod
↑ (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.

To configure backups to reduce inter-zone traffic and related costs on a cloud provider, follow these steps:

  1. Choose a backup solution that supports zone-to-zone backups within the same region.
  2. Configure the backup solution to store backups in a zone that is closest to the primary zone where the data is stored.
  3. Set up a backup schedule that takes into account the frequency of data changes and the retention period.
  4. Configure incremental backups to minimize the amount of data transferred between zones.
  5. Use a cloud provider that offers low-cost or free inter-zone traffic within the same region.
  6. Monitor your backup costs and adjust your backup strategy as needed to optimize cost-effectiveness.

By implementing these steps, you can reduce inter-zone traffic and related costs while still ensuring reliable backups of your data.