Skip to content

Commit

Permalink
fix: restore http server options for bandit migration from cowboy (#1917
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Ziinc authored Jan 11, 2024
1 parent 8556abe commit 49fc495
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,19 @@ config :logflare, LogflareWeb.Endpoint,
adapter: Bandit.PhoenixAdapter,
http: [
thousand_island_options: [
# https://cloud.google.com/load-balancing/docs/https/#timeouts_and_retries
# preserves idle keepalive connections up to load balancer max of 600s
# equivalent to cowboy's protocol_options.idle_timeout
# https://github.com/Logflare/logflare/blob/33da08d8f7f6c2b7b85205c04c46656eb1f1aac0/config/prod.exs#L22
read_timeout: 650_000,
# transport options are passed wholly to :gen_tcp
# https://github.com/mtrudel/thousand_island/blob/ae733332892b1bb2482a9cf4e97de03411fba2ad/lib/thousand_island/transports/tcp.ex#L61
transport_options: [
reuseport: true
# https://www.erlang.org/doc/man/inet
# both reuseport and reuseport_lb should be provided for linux
reuseport: true,
reuseport_lb: true
#
]
]
],
Expand Down

0 comments on commit 49fc495

Please sign in to comment.