Unclear what the configuration should be for sending large data over a network #2377
-
|
I have a system where I am sending image data (>1MB) between processes. Some subscribers of this data are on the same host, while one or two subscribers are on different hosts. I understand I must enable TCP for this. But it's unclear exactly what the individual configurations should be on the publisher and subscriber should be. For starters, I have read the docs page on eCAL TCP Layer. Here it says enabling TCP layer is a publisher setting. But, in publisher configuration, TCP is already enabled by default. In the subscriber, however, TCP is disabled by default. So it looks like the user must reconfigure the subscriber. Are the docs out of date? Did it mean to say enable TCP on the subscriber for large data? For large data, can I just leave all three transports (shm, udp_mc, tcp) enabled on both publisher and subscriber? Are there any disadvantages to that? Or should I explicitly turn off udp_mc on both pub and sub so that if the subscriber is on the same host, it continues to use shm, whereas if the subscriber is on a different host it is forced to use TCP instead? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
You are right, TCP is already enabled for publishing, but not for receiving. In order to get TCP to work, you have to enable it in the subscriber settings. And yes, you are right, the documentation seems to be confusing / outdated in this regard. Which of the (enabled) layers will be used for a data transfer is determined by:
By default, the ecal.yaml should look as follows: publisher:
# [...]
# Priority list for layer usage in cloud mode (Default: UDP > TCP)
priority_network: ["udp", "tcp"]Thus, if a topic by this default publisher encounters a subscriber that has UDP enabled, it will provide its data via UDP. If it however encounters a subscriber that ONLY has tcp enabled, it will send the data to that subsriber via TCP. This means, that you can also switch one particular subscriber to tcp by simply disabling UDP from it: subscriber:
layer:
udp:
enable: false
tcp:
enable: trueThis will still cause all other subscribers that run with different settings to receive the data via UDP. Update 2025-10-16The Documentation is now updated |
Beta Was this translation helpful? Give feedback.
You are right, TCP is already enabled for publishing, but not for receiving. In order to get TCP to work, you have to enable it in the subscriber settings. And yes, you are right, the documentation seems to be confusing / outdated in this regard.
Which of the (enabled) layers will be used for a data transfer is determined by:
By default, the ecal.yaml should look as follows:
Thus, if a topic by this default publisher encounters a subscriber that has UDP enabled, it will provide its data via…