Load balancing at a connection level
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- kubernetes, python
- Domain
- api, backend, distributed-systems, networking
Research direction
Start with the Python entry point riva.client.ASRService(auth) and the Kubernetes Deployment and Service definitions included in the report. Determine whether the client reuses connections and whether that explains the observed pod imbalance; done means documenting a confirmed cause or the missing evidence needed to reproduce it.
Written by the indexing model from the issue text.
Description
I have an application with two pods and some client from inside the same cluster connecting to them by a service, as far as I know this will do a connection level multiplexing.
There is no reason for the workload to be consistently higher at one pod than another, yet I can see one of the pods receiving nearly 3 times more load than the other over a period of 3 hours.
The pod with more load was already running when the other pod started.
My first hypothesis was session stickiness, but a quick test shows that the connections are balanced
for _ in `seq 300` ;
do
curl -b cookies.txt -c cookies.txt -s riva-api.riva:8002/metrics | grep '^nv_gpu_utilization';
sleep 0.1;
done | awk '{print $1}' | sort | uniq -c
My new hypothesis is that python riva client is reusing the connections. Does that make sense or we are guaranteed to start a new connection when calling riva.client.ASRService(auth)?
Here you can find some snippets of the configuration
riva-api (pod) partial definition
apiVersion: apps/v1
kind: Deployment
metadata:
name: riva-api
namespace: riva
labels:
app: riva-api
release: riva-api
spec:
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
app: riva-api
release: riva-api
template:
metadata:
labels:
app: riva-api
release: riva-api
...
spec:
...
containers:
- name: riva-api
image: nvcr.io/nvidia/riva/riva-speech:2.14.0
...
riva-api-online definition
apiVersion: v1
kind: Service
metadata:
name: riva-api
namespace: riva
spec:
ports:
...
selector:
app: riva-api
release: riva-api
- Dominant language
- Python
- Stars
- 142
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nvidia-riva/python-clients
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nvidia-riva/python-clients#172 · 4 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
nvidia-riva/python-clients#145 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
nvidia-riva/python-clients#100 · 1 comment ·
-
Connection_RefuseOpen
Difficulty 4/5 3-5 days Newbie friendliness 15/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
nvidia-riva/python-clients#93 · 1 reaction ·
All issues in nvidia-riva/python-clients
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
modelcontextprotocol/python-sdk#3648 ·
Maintainers usually reply within 1 day
-
docs good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
VenetoStato/giorgio#6 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
EclipseFdn/open-vsx.org#13831 ·
Maintainers usually reply within 1 day