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: remove head for non sharded deployments #4517

Merged
merged 20 commits into from Mar 31, 2022
Merged

Conversation

jacobowitz
Copy link
Contributor

@jacobowitz jacobowitz commented Mar 18, 2022

Remove heads for non sharded Deployments

Description

This PR removes the head for non sharded deployments. This means if shards are set to 1 for a Deployment, there will be no head created. In these cases the Gateway communicates directly with the workers.
Also reducing requests in case of multiple needs is moved to the Gateway now as we cant rely on the fact to due it at the head anymore.

This is a breaking change 💥 It breaks uses_before/uses_after for non sharded Deploments. It also changes the way we interact with external Executors. Additionally rolling_update and scale are removed from the Flow.

Before we do a release we should do the follow up issues around (external) Deployments as first class citizens.

  • Remove RollingUpdate/Scale feature from Flow/Deployment/Pod/JinaD
  • Set all worker Pods in the Gateway (Outside K8s)
  • Make the gateway send to worker Pods
  • Dont create heads for Deployments with no shards
  • Implement reducing after multiple needs in the Gateway
  • Adapt tests
  • Change docs

Closes #4503 (issue)

@github-actions github-actions bot added size/XL area/core This issue/PR affects the core codebase area/daemon area/testing This issue/PR affects testing labels Mar 18, 2022
@codecov
Copy link

codecov bot commented Mar 18, 2022

Codecov Report

Merging #4517 (23aec28) into master (70c931b) will increase coverage by 1.52%.
The diff coverage is 91.95%.

@@            Coverage Diff             @@
##           master    #4517      +/-   ##
==========================================
+ Coverage   85.95%   87.47%   +1.52%     
==========================================
  Files         115      115              
  Lines        8353     8298      -55     
==========================================
+ Hits         7180     7259      +79     
+ Misses       1173     1039     -134     
Flag Coverage Δ
jina 87.47% <91.95%> (+7.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
jina/excepts.py 100.00% <ø> (ø)
jina/parsers/orchestrate/deployment.py 100.00% <ø> (ø)
jina/serve/runtimes/head/__init__.py 92.42% <ø> (-0.12%) ⬇️
jina/orchestrate/deployments/__init__.py 87.46% <80.95%> (+4.90%) ⬆️
jina/serve/networking.py 84.31% <83.33%> (-2.81%) ⬇️
jina/orchestrate/flow/base.py 89.95% <95.23%> (+7.35%) ⬆️
...a/orchestrate/deployments/config/docker_compose.py 100.00% <100.00%> (+0.57%) ⬆️
jina/orchestrate/deployments/config/k8s.py 100.00% <100.00%> (+0.64%) ⬆️
jina/parsers/orchestrate/runtimes/remote.py 100.00% <100.00%> (ø)
jina/serve/runtimes/gateway/__init__.py 100.00% <100.00%> (ø)
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a75d9c...23aec28. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Mar 18, 2022

Latency summary

Current PR yields:

  • 🐢🐢 index QPS at 992, delta to last 2 avg.: -18%
  • 🐢🐢 query QPS at 48, delta to last 2 avg.: -24%
  • 🐎🐎🐎🐎 avg flow time within 1.509 seconds, delta to last 2 avg.: +31%
  • 🐎🐎🐎🐎 import jina within 0.5272 seconds, delta to last 2 avg.: +18%

Breakdown

Version Index QPS Query QPS Avg Flow Time (s) Import Time (s)
current 992 48 1.509 0.5272
3.2.10 1068 56 1.2347 0.4858
3.2.9 1371 71 1.0578 0.4008

Backed by latency-tracking. Further commits will update this comment.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

2 similar comments
@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions github-actions bot added the area/cli This issue/PR affects the command line interface label Mar 21, 2022
@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

4 similar comments
@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

3 similar comments
@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

1 similar comment
@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions github-actions bot added the area/helper This issue/PR affects the helper functionality label Mar 29, 2022
@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions github-actions bot added the area/docs This issue/PR affects the docs label Mar 29, 2022
@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions github-actions bot removed area/cli This issue/PR affects the command line interface component/client labels Mar 31, 2022
@jacobowitz
Copy link
Contributor Author

rebased and added ports property to the Deployment

@jacobowitz jacobowitz closed this Mar 31, 2022
@jacobowitz jacobowitz reopened this Mar 31, 2022
@github-actions
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions github-actions bot added the area/cli This issue/PR affects the command line interface label Mar 31, 2022
@github-actions
Copy link

📝 Docs are deployed on https://feat-head-optimization--jina-docs.netlify.app 🎉

@jacobowitz jacobowitz requested a review from JoanFM March 31, 2022 08:16
@jacobowitz jacobowitz merged commit 12163af into master Mar 31, 2022
@jacobowitz jacobowitz deleted the feat-head-optimization branch March 31, 2022 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli This issue/PR affects the command line interface area/core This issue/PR affects the core codebase area/daemon area/docs This issue/PR affects the docs area/helper This issue/PR affects the helper functionality area/testing This issue/PR affects testing size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove Head entity from Deployments without shards
3 participants