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: hosts for replicas #2338

Merged
merged 5 commits into from
Apr 26, 2021
Merged

feat: hosts for replicas #2338

merged 5 commits into from
Apr 26, 2021

Conversation

florian-hoenicke
Copy link
Member

@florian-hoenicke florian-hoenicke commented Apr 22, 2021

closes #2339

@jina-bot jina-bot added size/M area/core This issue/PR affects the core codebase area/helper This issue/PR affects the helper functionality area/network This issue/PR affects network functionality area/testing This issue/PR affects testing component/peapod labels Apr 22, 2021
@codecov
Copy link

codecov bot commented Apr 22, 2021

Codecov Report

Merging #2338 (b81dbb6) into master (82fb810) will increase coverage by 1.09%.
The diff coverage is 99.08%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2338      +/-   ##
==========================================
+ Coverage   89.77%   90.86%   +1.09%     
==========================================
  Files         222      222              
  Lines       11958    12013      +55     
==========================================
+ Hits        10735    10916     +181     
+ Misses       1223     1097     -126     
Flag Coverage Δ
daemon 50.81% <60.55%> (-0.15%) ⬇️
jina 91.03% <99.08%> (+1.15%) ⬆️

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

Impacted Files Coverage Δ
jina/enums.py 96.00% <ø> (-0.03%) ⬇️
jina/parsers/peapods/pod.py 100.00% <ø> (ø)
jina/peapods/pods/__init__.py 92.83% <98.61%> (+4.83%) ⬆️
jina/peapods/pods/compoundpod.py 90.22% <100.00%> (+56.89%) ⬆️
jina/executors/indexers/keyvalue.py 98.12% <0.00%> (-0.44%) ⬇️
jina/executors/indexers/query/keyvalue.py 93.75% <0.00%> (-0.37%) ⬇️
jina/executors/crafters/__init__.py 100.00% <0.00%> (ø)
jina/executors/encoders/__init__.py 100.00% <0.00%> (ø)
jina/executors/segmenters/__init__.py 100.00% <0.00%> (ø)
jina/executors/encoders/numeric/__init__.py 100.00% <0.00%> (ø)
... and 16 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 82fb810...b81dbb6. Read the comment docs.

@florian-hoenicke florian-hoenicke linked an issue Apr 22, 2021 that may be closed by this pull request
@florian-hoenicke florian-hoenicke marked this pull request as ready for review April 22, 2021 22:25
@florian-hoenicke florian-hoenicke requested a review from a team as a code owner April 22, 2021 22:25
@github-actions
Copy link

github-actions bot commented Apr 22, 2021

Latency summary

Current PR yields:

  • 😶 index QPS at 1192, delta to last 3 avg.: +0%
  • 🐢🐢 query QPS at 16, delta to last 3 avg.: -8%

Breakdown

Version Index QPS Query QPS
current 1192 16
1.1.9 1188 17

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

Copy link
Member

@JoanFM JoanFM left a comment

Choose a reason for hiding this comment

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

I think to have hosts for different Pods in the CompoundPod we need another layer of arguments.

We could start by adding replica hosts, to allow every replica to be on one host, and then maybe consider different hosts for every Pea of every replica

jina/peapods/pods/__init__.py Show resolved Hide resolved
@florian-hoenicke
Copy link
Member Author

We could start by adding replica hosts, to allow every replica to be on one host, and then maybe consider different hosts for every Pea of every replica

With this implementation, every pea can have its own host.

@JoanFM
Copy link
Member

JoanFM commented Apr 23, 2021

We could start by adding replica hosts, to allow every replica to be on one host, and then maybe consider different hosts for every Pea of every replica

With this implementation, every pea can have its own host.

but what about different Peas of different Replicas?

@florian-hoenicke
Copy link
Member Author

but what about different Peas of different Replicas?
yes, all the peas generated by parallel * replicas can run on different hosts.

@JoanFM
Copy link
Member

JoanFM commented Apr 23, 2021

but what about different Peas of different Replicas?
yes, all the peas generated by parallel * replicas can run on different hosts.

My biggest concern is, that the new pattern of havinf CompoundPod just a composition of Pods is not so well defined.

@florian-hoenicke
Copy link
Member Author

Interesting - a timeout again. I will investigate what it is caused by.

@florian-hoenicke
Copy link
Member Author

@JoanFM is there anything left to do for me?

Comment on lines +197 to +210
args = set_pod_parser().parse_args(
[
'--name',
'pod',
'--parallel',
'2',
'--replicas',
'3',
'--peas-hosts',
*[f'0.0.0.{i+1}' for i in range(num_hosts)],
'--runtime-backend',
'process',
]
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you try to convert one of the functional integration tests (CRUD etc.) to use this approach, to see that the ops work properly in this new setup?

@florian-hoenicke florian-hoenicke merged commit 9cb2330 into master Apr 26, 2021
@florian-hoenicke florian-hoenicke deleted the feat-hosts-for-replicas branch April 26, 2021 07:21
Copy link
Contributor

@cristianmtr cristianmtr left a comment

Choose a reason for hiding this comment

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

one request

davidbp pushed a commit that referenced this pull request Apr 29, 2021
* feat: hosts for replicas

* feat: hosts for replicas cleanup

* test: fix same ports

* refactor: abstract base method

* refactor: more readable
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/helper This issue/PR affects the helper functionality area/network This issue/PR affects network functionality area/testing This issue/PR affects testing component/peapod size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hosts for replicas
4 participants