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

fix(prover): Create reqwest client only once #3324

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

yorik
Copy link
Contributor

@yorik yorik commented Nov 22, 2024

What ❔

Create reqwest client only once.

Additionally HttpClient exports metric calls with all the requests and correct status codes.

Why ❔

Creating reqwest client is expensive because it initializes TLS, loads certificates, etc. So it should be create only once and reused.

Create new internal mod http_client instead of patching zksync_utils because fn send_request_with_retries is used only in prover_autoscaler and outdated prover_fri, which will be removed soon.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zkstack dev fmt and zkstack dev lint.

ref ZKD-1855

Creating reqwest client is expensive because it initializes TLS, loads
certificates, etc. So it should be create only once and reused.

Create new internal mod http_client instead of patching zksync_utils
because fn `send_request_with_retries` is used only in prover_autoscaler
and outdated prover_gpu_fri, which will be removed soon.

Additionally HttpClient exports metric `calls` with all the requests and
correct status codes.

ref ZKD-1855
@yorik yorik enabled auto-merge November 22, 2024 16:01
@yorik yorik requested a review from EmilLuta November 22, 2024 16:10
@yorik yorik added this pull request to the merge queue Nov 27, 2024
Merged via the queue into main with commit 40f8123 Nov 27, 2024
31 checks passed
@yorik yorik deleted the ya--implement-poc-of-quick-prover-autoscaler-http-client branch November 27, 2024 15:56
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