From 247922a093d19c4863b8911005a1fe85bb2eac8f Mon Sep 17 00:00:00 2001 From: Catherine Date: Mon, 22 Sep 2025 08:28:19 +0000 Subject: [PATCH] Fly.io: configure concurrency. The default is 20, and is regularly reached by crawlers or overly enthusiastic browsers. The actual concurrency limit is likely closer to 500-1000. --- fly.toml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/fly.toml b/fly.toml index 5a9fb6b..ba76143 100644 --- a/fly.toml +++ b/fly.toml @@ -26,21 +26,43 @@ AUTOMEMLIMIT = "0.25" guest_path = "/app/config.toml" local_path = "config.fly.toml" +# [::]:80/TCP; HTTP/1.1 and HTTP/2 (cleartext) + [[services]] internal_port = 80 protocol = "tcp" -ports = [{ port = 80, handlers = ["proxy_proto"], proxy_proto_options = { version = "v2" } }] auto_stop_machines = "stop" auto_start_machines = true +[[services.ports]] +port = 80 +handlers = ["proxy_proto"] +proxy_proto_options = { version = "v2" } + +[services.concurrency] +type = "connections" +soft_limit = 250 + +# [::]:433/TCP; HTTP/1.1 and HTTP/2 + [[services]] internal_port = 443 protocol = "tcp" -ports = [{ port = 443, handlers = ["proxy_proto"], proxy_proto_options = { version = "v2" } }] auto_stop_machines = "stop" auto_start_machines = true -# NB: Fly.io does not support UDP on public IPv6 +[[services.ports]] +port = 443 +handlers = ["proxy_proto"] +proxy_proto_options = { version = "v2" } + +[services.concurrency] +type = "connections" +soft_limit = 250 + +# 0.0.0.0:433/UDP; HTTP/3 +# (Fly.io does not support UDP on public IPv6!) + [[services]] internal_port = 443 protocol = "udp" @@ -48,6 +70,8 @@ ports = [{ port = 443 }] auto_stop_machines = "stop" auto_start_machines = true +# monitoring + [checks.health] type = "http" method = "get"