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: use external pods from k8s #4223

Merged
merged 14 commits into from
Jan 31, 2022
Merged

feat: use external pods from k8s #4223

merged 14 commits into from
Jan 31, 2022

Conversation

jacobowitz
Copy link
Contributor

This closes #4145

This PR adds the possibility to use external Pods from a Flow in K8s. Before this PR, we would always generate K8s yaml files for the external Pods.
With this change those yamls for the external Pod are no longer generated. Also the Gateway pod address list logic is updated to cater for those external Pods. External Pods always need to be announced to the Gateway. It does not matter if the K8sConnectionPool is used or not. The gateway will always communicate to the head of the external Pod via a fixed address, configured in the Flow.

@github-actions github-actions bot added size/M area/core This issue/PR affects the core codebase area/testing This issue/PR affects testing labels Jan 27, 2022
@codecov
Copy link

codecov bot commented Jan 27, 2022

Codecov Report

Merging #4223 (f7ee0d5) into master (f95eb9e) will increase coverage by 1.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4223      +/-   ##
==========================================
+ Coverage   85.75%   86.81%   +1.06%     
==========================================
  Files         114      114              
  Lines        8268     8284      +16     
==========================================
+ Hits         7090     7192     +102     
+ Misses       1178     1092      -86     
Flag Coverage Δ
daemon 42.43% <10.00%> (+0.11%) ⬆️
jina 86.56% <100.00%> (+2.00%) ⬆️

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

Impacted Files Coverage Δ
jina/orchestrate/flow/base.py 91.06% <100.00%> (+9.76%) ⬆️
jina/orchestrate/pods/config/k8s.py 100.00% <100.00%> (ø)
jina/orchestrate/pods/config/helper.py 88.46% <0.00%> (-7.70%) ⬇️
jina/jaml/__init__.py 95.47% <0.00%> (+0.41%) ⬆️
jina/serve/runtimes/gateway/http/app.py 90.80% <0.00%> (+1.14%) ⬆️
jina/helper.py 81.87% <0.00%> (+1.22%) ⬆️
jina/jaml/parsers/flow/v1.py 98.24% <0.00%> (+1.75%) ⬆️
jina/clients/base/http.py 96.22% <0.00%> (+1.88%) ⬆️
jina/orchestrate/peas/jinad.py 93.02% <0.00%> (+2.32%) ⬆️
jina/jaml/helper.py 85.36% <0.00%> (+2.43%) ⬆️
... and 5 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 6b16872...f7ee0d5. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Jan 27, 2022

Latency summary

Current PR yields:

  • 🐢🐢 index QPS at 706, delta to last 2 avg.: -47%
  • 🐎🐎🐎🐎 query QPS at 35, delta to last 2 avg.: +37%
  • 🐎🐎🐎🐎 avg flow time within 1.859 seconds, delta to last 2 avg.: +46%
  • 🐎🐎🐎🐎 import jina within 0.4646 seconds, delta to last 2 avg.: +14%

Breakdown

Version Index QPS Query QPS Avg Flow Time (s) Import Time (s)
current 706 35 1.859 0.4646
2.6.4 1112 20 1.4958 0.4581
2.6.3 1570 30 1.0354 0.3554

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

tests/k8s/test_k8s.py Show resolved Hide resolved
@JoanFM JoanFM merged commit 1d6c077 into master Jan 31, 2022
@JoanFM JoanFM deleted the feat-external-pods-k8s branch January 31, 2022 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core This issue/PR affects the core codebase area/testing This issue/PR affects testing size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check external pods in K8s
2 participants