Skip to content

Commit

Permalink
Revert "Scale dns packet size with expected real servers"
Browse files Browse the repository at this point in the history
This reverts commit 382dc9c.
  • Loading branch information
bahamat committed Nov 1, 2024
1 parent 382dc9c commit 8e990c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
13 changes: 6 additions & 7 deletions haproxy.cfg/002-resolver.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@

resolvers system
parse-resolv-conf
accepted_payload_size 512
hold valid 15s # Don't query too often
hold valid 15s # Don't query too often
# DNS resolution errors
hold obsolete 5s # If CNS removed it, we should as well
hold refused 3600s # If system resolver is throttling us, ignore that
hold nx 30s # If resolution says this host doesn't exist
hold timeout 30s # If the DNS server did not respond
hold other 30s # Any other error
hold obsolete 5s # If CNS removed it, we should as well
hold refused 3600s # If system resolver is throttling us, ignore that
hold nx 30s # If resolution says this host doesn't exist
hold timeout 30s # If the DNS server did not respond
hold other 30s # Any other error
11 changes: 0 additions & 11 deletions reconfigure
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,6 @@ function ensure_haproxy {
}

function configure_haproxy {
# By default haproxy doesn't accept packets over 512b, so if we're scaling
# the maximum number of servers, we also need to scale the size of DNS
# response we can handle.
max_rs=$(mdata-get cloud.tritoncompute:max_rs)
# If max_rs isn't set in metadata, default to 32.
payload_size=$(( 16 * ${max_rs:=32} ))
# Use three spaces to align columns.
if ! grep -q "accepted_payload_size ${payload_size}"; then
sed -i'' "s/accepted_payload_size .*/accepted_payload_size $payload_size/" "${TOP}/haproxy.cfg/002-resolver.cfg"
fi

rsync -a "${skel_config_dir}/" "${candidate_config_dir}/"
{
printf '# #\n'
Expand Down

0 comments on commit 8e990c4

Please sign in to comment.