Hi Maxim,
see https://discuss.elastic.co/t/elasticsearch-ccs-client-get-timeout-when-remote-cluster-is-isolated-by-firewall/152019/8 for a similar recent discussion. Elasticsearch is currently not super quick detecting when remote clusters are down and that may make requests hang. We have been working on improving that and some changes in that direction will go out with the 6.6 version.

One thing you could do on your end is tweak OS settings like suggested by David in the linked discussion, see also https://github.com/elastic/elasticsearch/issues/34405#issuecomment-429465972 .