Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly lowering TCP keepalives to 120s to deal with naughty load balancers #548

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Unreleased
* Increased the timeout for querying ``sys.snapshots`` table when verifying backup
repository.

* Explicitly lowering TCP keepalives to 120s to deal with naughty load balancers.
Looking at you, AWS NLB.

2.30.3 (2023-08-29)
-------------------

Expand Down
12 changes: 11 additions & 1 deletion crate/operator/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,17 @@ def get_statefulset_init_containers(crate_image: str) -> List[V1Container]:
# We need to do this in an init container because of the required
# security context. We don't want to run CrateDB with that context,
# thus doing it before.
command=["sysctl", "-w", "vm.max_map_count=262144"],
command=[
"sysctl",
"-w",
# CrateDB requirement due to the number of open file descriptors
"vm.max_map_count=262144",
# Certain load balancers (i.e. AWS NLB) terminate idle connections.
# We set explicit TCP keepalives so that this does not happen.
"net.ipv4.tcp_keepalive_time=120",
"net.ipv4.tcp_keepalive_intvl=30",
"net.ipv4.tcp_keepalive_probes=6",
],
image="busybox:1.35.0",
image_pull_policy="IfNotPresent",
name="init-sysctl",
Expand Down