Skip to content

Commit 8cc3cc1

Browse files
authored
[ruby/hanami] Auto config workers (TechEmpower#10085)
Let Puma select the number of workers.
1 parent 7216589 commit 8cc3cc1

File tree

3 files changed

+1
-49
lines changed

3 files changed

+1
-49
lines changed

frameworks/Ruby/hanami/config/auto_tune.rb

Lines changed: 0 additions & 43 deletions
This file was deleted.

frameworks/Ruby/hanami/config/puma.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
# frozen_string_literal: true
2-
require_relative 'auto_tune'
3-
4-
# FWBM only... use the puma_auto_tune gem in production!
5-
num_workers, num_threads = auto_tune
6-
7-
workers num_workers
82
threads 3, 3
93

104
port ENV.fetch("HANAMI_PORT", 2300)

frameworks/Ruby/hanami/hanami.dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM ruby:3.4
22

33
ENV RUBY_YJIT_ENABLE=1
4+
ENV WEB_CONCURRENCY=auto
45

56
# Use Jemalloc
67
RUN apt-get update && \

0 commit comments

Comments
 (0)