hazelcast / hazelcast/hazelcast-python-client
[TRACKING ISSUE] TPC default to 1 connection
- Dominant language
- Python
- Stars
- 116
- Forks
- 78
- Avg merge
- 10d 22h
- Merged PRs (30d)
- 1
Description
The tracking issue for the Java side PR.
See https://github.com/hazelcast/hazelcast/pull/25871 for details.
---
Before this PR, when a TPC aware client connects to a TPC enabled server, the server sends the list of TPC ports it can connect to. So if the server has 64 TPC threads, it will open 64 server sockets and the client will make 64 connections.
The problem is that having many connections, leads to smaller and more packets which causes additional processing overhead and can run into packets per seconds limits (e.g. on AWS). And the performance penalty of the PPS limit is a lot higher than the penalty of context switching.
This PR changes that. By default, a client will now connect to 1 random port from the TPC port list. The Hazelcast member will then route the request to the right core (the same as with classic networking). The number of ports can be configured through the ClientTpcConfig object and one can restore the behavior of connecting to all TPC ports or a subset.
Contributor guide
Research direction
Start with the linked Java-side PR for the detailed implementation context, then inspect the Python client’s TPC connection handling and ClientTpcConfig support. Done would mean the Python client defaults to one TPC connection while allowing the configured connection count described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, python
- Domain
- distributed-systems, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100