Skip to content

Commit

Permalink
feat: Tune TCP keepalive settings for improved connection stability
Browse files Browse the repository at this point in the history
This commit adjusts the TCP keepalive parameters to enhance connection stability and prevent silent failures.

Signed-off-by: Jason Cameron <[email protected]>
  • Loading branch information
JasonLovesDoggo committed Oct 1, 2024
1 parent ba4b3cc commit 0460d21
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion automation/playbooks/tasks/networking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,16 @@
- name: UFW - enable and by default drop
ufw:
state: enabled
default: deny
default: deny


- name: Set TCP keepalive parameters
ansible.builtin.sysctl:
name: "{{ item.name }}"
value: "{{ item.value }}"
state: present
reload: yes
loop:
- { name: "net.ipv4.tcp_keepalive_time", value: "600" }
- { name: "net.ipv4.tcp_keepalive_intvl", value: "30" }
- { name: "net.ipv4.tcp_keepalive_probes", value: "10" }

0 comments on commit 0460d21

Please sign in to comment.