Of course, they are all connected by private lines, and more than one private line is automatically switched by backup. The three major commodity futures exchanges (Shanghai, Zhengzhou and Dalian) have closed-loop connections. When a futures company accesses any exchange, it can connect with three exchanges for trading, while China Financial Futures Exchange needs separate access.
As for the relationship between the distance between CTP and the exchange and the transaction speed, there will be no essential difference no matter how far it is, because the distance difference of several thousand kilometers is only one hundredth of a second delay for electromagnetic waves. As for testing the transaction speed, just write a small program to test it.