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

proxy: reduce number of concurrent connections #7620

Merged
merged 3 commits into from
May 6, 2024

Conversation

khanova
Copy link
Contributor

@khanova khanova commented May 6, 2024

Problem

Usually, the connection itself is quite fast (bellow 10ms for p999: https://neonprod.grafana.net/goto/aOyn8vYIg?orgId=1).

It doesn't make a lot of sense to wait for a lot of time for the lock, if it takes a lot of time to acquire it, probably, something goes wrong.

We also spawn a lot of retries, but they are not super helpful (0 means that it was connected successfully, 1, most probably, that it was re-request of the compute node address https://neonprod.grafana.net/goto/J_8VQvLIR?orgId=1). Let's try to keep a small number of retries.

Summary of changes

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

@khanova khanova requested review from a team as code owners May 6, 2024 13:21
Copy link
Member

@skyzh skyzh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, could you please remove the changes to Postgres? thanks!

@khanova
Copy link
Contributor Author

khanova commented May 6, 2024

LGTM, could you please remove the changes to Postgres? thanks!

Yep, it was accidental, forgot to do git submodule update

Copy link

github-actions bot commented May 6, 2024

2928 tests run: 2807 passed, 0 failed, 121 skipped (full report)


Flaky tests (3)

Postgres 16

  • test_vm_bit_clear_on_heap_lock: debug

Postgres 15

  • test_partial_evict_tenant[relative_spare]: release
  • test_delete_tenant_exercise_crash_safety_failpoints[real_s3-tenant-delete-before-remove-deleted-mark-False-Check.RETRY_WITH_RESTART]: release

Code coverage* (full report)

  • functions: 31.4% (6237 of 19865 functions)
  • lines: 47.1% (46739 of 99266 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
7734e90 at 2024-05-06T19:10:57.593Z :recycle:

@khanova khanova enabled auto-merge (squash) May 6, 2024 18:40
@khanova khanova merged commit f1b654b into main May 6, 2024
53 checks passed
@khanova khanova deleted the proxy-reduce-concurrent-conns branch May 6, 2024 19:03
conradludgate pushed a commit that referenced this pull request May 8, 2024
## Problem

Usually, the connection itself is quite fast (bellow 10ms for p999:
https://neonprod.grafana.net/goto/aOyn8vYIg?orgId=1).

It doesn't make a lot of sense to wait for a lot of time for the lock,
if it takes a lot of time to acquire it, probably, something goes wrong.

We also spawn a lot of retries, but they are not super helpful (0 means
that it was connected successfully, 1, most probably, that it was
re-request of the compute node address
https://neonprod.grafana.net/goto/J_8VQvLIR?orgId=1). Let's try to keep
a small number of retries.
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.

None yet

3 participants