Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(envoy): only log when status code >=400, switch from file to stdout access logger #837

Merged
merged 2 commits into from
Dec 11, 2023

Conversation

thebengeu
Copy link
Member

Quick checks using the simple-update k6 benchmark from https://github.com/thebengeu/simple-supabase-benchmarks on t4g.nano, with SCALE=30 and 100 VUs over 3 minutes:

  • Kong: 442 rps, req duration med=129ms p(90)=410ms p(95)=668ms
  • Envoy log all: 613 rps, req duration med=155ms p(90)=207ms p(95)=250ms
  • Envoy log errors: 761 rps, req duration med=126ms, p(90)=154ms, p(95)=179ms

So on this benchmark, this change results in ~24% more rps than Envoy logging all requests, ~72% more rps than Kong. Kong is also configured to only log errors, proxy_access_log = off here:

proxy_access_log = off
.

Quick checks using the simple-update k6 benchmark from https://github.com/thebengeu/simple-supabase-benchmarks on t4g.nano, with SCALE=30 and 100 VUs over 3 minutes:

- Kong: 442 rps, req duration med=129ms p(90)=410ms p(95)=668ms
- Envoy log all: 613 rps, req duration med=155ms p(90)=207ms p(95)=250ms
- Envoy log errors: 761 rps, req duration med=126ms, p(90)=154ms, p(95)=179ms

So on this benchmark, this change results in ~24% more rps than Envoy logging all requests, ~72% more rps than Kong. Kong is also configured to only log errors, `proxy_access_log = off` here: https://github.com/supabase/postgres/blob/a3938dc906010ce197c240d0052b3eda9ecac339/docker/all-in-one/etc/kong/kong.conf#L12.
@thebengeu thebengeu requested a review from a team as a code owner December 8, 2023 20:19
@thebengeu thebengeu merged commit 276aa4c into develop Dec 11, 2023
7 of 8 checks passed
@thebengeu thebengeu deleted the beng/envoy-access-log branch December 11, 2023 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants