# Percona XtraDB write-set replication traffic keep alive

**URL:** <https://forums.percona.com/t/percona-xtradb-write-set-replication-traffic-keep-alive/12268>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [September 23, 2021, 8:45am UTC](https://forums.percona.com/t/percona-xtradb-write-set-replication-traffic-keep-alive/12268 "2021-09-23T08:45:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giovanni\_Vecchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/giovanni_vecchi/32/2415_2.png) [@Giovanni\_Vecchi](https://forums.percona.com/u/Giovanni_Vecchi)\
**Post date:** [September 23, 2021, 8:45am UTC](https://forums.percona.com/t/percona-xtradb-write-set-replication-traffic-keep-alive/12268/1 "2021-09-23T08:45:43Z")

</div>

Hi there,

my config is a 7 nodes Percona XtraDB 5.7 geo cluster: 5 nodes are EC2 AWS instances and 2 are vSphere VM in our on-prem environment; on-prem nodes can contact cloud nodes thanks to a Site-to-Site tunnesl between our on-prem firewalls and AWS VPC (the subnets are routed, not NATted).  
The cluster is the backend of our internal DNS solution (powerdns) and provide a native multi-master configuration also for DNS servers; due the nature of our infrastructure, DNS records rarely change and so there is few replica traffic: because of this our on-prem firewall periodically send TCP reset to on-prem nodes for connections to aws nodes on port 4567 and this cause a dayly nodes evictions and re-join.  
Is it possible to configure any sort of keep alive functionality in order to prevent TCP connection reset by the firewalls?

Thanks

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [September 23, 2021, 2:35pm UTC](https://forums.percona.com/t/percona-xtradb-write-set-replication-traffic-keep-alive/12268/2 "2021-09-23T14:35:09Z")

</div>

[https://galeracluster.com/library/documentation/galera-parameters.html#evs-keepalive-period](https://galeracluster.com/library/documentation/galera-parameters.html#evs-keepalive-period)

Keepalive heartbeat packets are sent to every node, every 1s by default. This is not enough to keep your firewall happy?

Another option is to simply write something to a dummy table every 1s. Use something like pt-heartbeat, which UPDATEs 1 record every 1s. That will create constant traffic. If your nodes are still being evicted, then you should check the config of your firewall.

---

<div class="post-metadata">

**Author:** ![Giovanni\_Vecchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/giovanni_vecchi/32/2415_2.png) [@Giovanni\_Vecchi](https://forums.percona.com/u/Giovanni_Vecchi)\
**Post date:** [September 23, 2021, 4:24pm UTC](https://forums.percona.com/t/percona-xtradb-write-set-replication-traffic-keep-alive/12268/3 "2021-09-23T16:24:45Z")

</div>

Hi @matthewb

thanks for your suggestions: are the keepalive heartbeat packets sent through TCP/4567 port? If yes, I think I’m on the wrong way to solve my issue.

Thanks again!

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [September 23, 2021, 5:18pm UTC](https://forums.percona.com/t/percona-xtradb-write-set-replication-traffic-keep-alive/12268/4 "2021-09-23T17:18:37Z")

</div>

- `4567` is reserved for Galera [Cluster Replication](https://galeracluster.com/library/documentation/glossary.html#term-cluster-replication) traffic. Multicast replication uses both TCP and UDP transport on this port.

Yes, everything Galera traffic is over 4567

---

<div class="post-metadata">

**Author:** ![Giovanni\_Vecchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/giovanni_vecchi/32/2415_2.png) [@Giovanni\_Vecchi](https://forums.percona.com/u/Giovanni_Vecchi)\
**Post date:** [September 27, 2021, 9:21am UTC](https://forums.percona.com/t/percona-xtradb-write-set-replication-traffic-keep-alive/12268/5 "2021-09-27T09:21:02Z")

</div>

Thanks for pointing me to the right documentation: is the keepalive messages logged? May I need to start mysql daemon with an higher verbosity option?  
In the meantime, I will go ahead with firewall troubleshooting.

Thanks again!

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [September 27, 2021, 4:17pm UTC](https://forums.percona.com/t/percona-xtradb-write-set-replication-traffic-keep-alive/12268/6 "2021-09-27T16:17:54Z")

</div>

The messages are part of the core Galera protocol and are not logged, AFAIK. What is logged is when the heartbeats are missed, and you’ve seen that already.

---

<div class="post-metadata">

**Author:** ![Giovanni\_Vecchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/giovanni_vecchi/32/2415_2.png) [@Giovanni\_Vecchi](https://forums.percona.com/u/Giovanni_Vecchi)\
**Post date:** [September 28, 2021, 8:04am UTC](https://forums.percona.com/t/percona-xtradb-write-set-replication-traffic-keep-alive/12268/7 "2021-09-28T08:04:51Z")

</div>

I was able to confirm keepalive packets running a tcpdump capture on servers, something like that:

sudo tcpdump -n -i \<server\_interface\> ‘dst (\<node1\_ip\> or \<node2\_ip\> or \<node3\_ip\> or \<node4\_ip\> or \<node5\_ip\> or \<node6\_ip\>) and dst port 4567’

TCP reset are logged about once or twice a day for every node ip on the firewall but I’m still unable to find the root cause.  
Saying that, I’ll go ahead closing this thread.

Thank you all guys!
