Skip to content

Commit

Permalink
Merge pull request #16 from bento-platform/perf/tweaks
Browse files Browse the repository at this point in the history
perf: performance tweaks
  • Loading branch information
davidlougheed authored Apr 23, 2024
2 parents a19735a + 44b5c3c commit 2529122
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions conf/nginx.conf.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
worker_processes 1;
worker_processes 2;
pcre_jit on;

# expose env vars to lua code
env BENTO_DEBUG;
Expand All @@ -7,7 +8,8 @@ env BENTO_AUTHZ_SERVICE_URL;
error_log stderr info;

events {
worker_connections 1024;
worker_connections 2048;
use epoll; # Should be default on Linux, but explicitly use it
}

# tpl__tls_yes__start
Expand Down Expand Up @@ -49,6 +51,9 @@ http {
# Allow SNI-based proxying
proxy_ssl_server_name on;
# Allow sendfile() for sending small files directly
sendfile on;
# Set up log format
log_format compression '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
Expand Down
2 changes: 2 additions & 0 deletions src/proxy_auth_v2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ local uri = ngx.var.uri -- post-rewrite URI

if req_method == "GET" and (
uri == "/service-info" or -- any service-info endpoint; rewritten from original /api/.../service-info
uri == "/workflows" or -- any workflow-providing endpoint; rewritten from original /api/.../workflows
uri:sub(1, 11) == "/workflows/" or -- "
req_uri_no_qp == "/api/metadata/api/projects" or
req_uri_no_qp == "/api/metadata/api/public" or
req_uri_no_qp == "/api/metadata/api/public_overview" or
Expand Down

0 comments on commit 2529122

Please sign in to comment.