Is it recommended that the endpoint and the master shard be co-located?
Last updated 22, Mar 2024
Question
Is it recommended that the endpoint and the master shard be co-located?
Answer
A client always connects to the endpoint and sends requests to it. Internally, the endpoint forwards those requests to the master shard and collects responses before sending those responses back to the client. In the event where both the endpoint and master shard are on two separate nodes, there is an extra layer of inter-node communication for each request/response thus, adding latency from the client's point of view. If we move the endpoint to the node where the master shard is, the inter-node communication can be avoided, and performance can be improved.
Improvements have been made in both the proxy server and the cluster orchestration in general, where the cluster can make better decisions regarding moving the endpoints automatically to other nodes if and when necessary.