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

feat(backend): 1つのMisskeyで複数のHTTPサーバプロセスを起動できるように #15398

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

samunohito
Copy link
Member

@samunohito samunohito commented Feb 5, 2025

※v2025.2.1がそこそこ大きくなりつつあるので、v2025.2.1よりも後を望みます

What

メインプロセスでのみHTTPリクエストを受け付けて処理していたのを、複数のワーカープロセスで処理できるように拡張します。

デフォルト値はこのprによる対応前と同じ動作(=HTTPサーバプロセスは1、ワーカープロセスはclusterLimitの数だけ)をするようになっていますので、configを変えない限り影響はありません。

Why

fix #13662

CPUに負担がかかる処理がちらほらとあり、メインプロセス(HTTPサーバプロセス)の負荷となってしまうのを分散させるため

Additional info (optional)

TODO:

  • 効果測定
  • ymlへのコメント記述
  • CHANGELOG.mdの更新

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added packages/backend Server side specific issue/PR packages/backend:test labels Feb 5, 2025
@samunohito samunohito changed the title feat(backend): 1つのMisskeyで複数のHTTPサーバプロセスを起動できるように [wip] feat(backend): 1つのMisskeyで複数のHTTPサーバプロセスを起動できるように Feb 5, 2025
Copy link
Contributor

github-actions bot commented Feb 5, 2025

このPRによるapi.jsonの差分
差分はありません。
Get diff files from Workflow Page

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 65.75342% with 75 lines in your changes missing coverage. Please review.

Project coverage is 38.71%. Comparing base (cfb6128) to head (5c55250).

Files with missing lines Patch % Lines
packages/backend/src/boot/master.ts 0.00% 24 Missing ⚠️
packages/backend/src/boot/sentry.ts 33.33% 20 Missing ⚠️
packages/backend/src/boot/const.ts 0.00% 11 Missing and 1 partial ⚠️
packages/backend/src/boot/worker.ts 87.20% 11 Missing ⚠️
packages/backend/src/boot/entry.ts 0.00% 6 Missing ⚠️
packages/backend/src/boot/common.ts 95.74% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #15398       +/-   ##
============================================
+ Coverage    18.81%   38.71%   +19.89%     
============================================
  Files          766     1607      +841     
  Lines       111337   204744    +93407     
  Branches      1234     4043     +2809     
============================================
+ Hits         20947    79257    +58310     
- Misses       89801   124847    +35046     
- Partials       589      640       +51     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@samunohito samunohito changed the title [wip] feat(backend): 1つのMisskeyで複数のHTTPサーバプロセスを起動できるように feat(backend): 1つのMisskeyで複数のHTTPサーバプロセスを起動できるように Feb 6, 2025
@samunohito samunohito marked this pull request as ready for review February 6, 2025 23:53
@samunohito
Copy link
Member Author

open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend:test packages/backend Server side specific issue/PR
Projects
Development

Successfully merging this pull request may close these issues.

backend: ワーカープロセスでもリクエストを捌けるようにする
1 participant