A method including determining, by a first device in communication with a second device in a mesh network, an optimal midpath node to be utilized for communicating meshnet data between the first device and the second device; and transmitting, by the first device to the second device, coordination information including identification information that identifies the optimal midpath node and timing information that indicates a time associated with connecting with the optimal midpath node to enable utilization of the optimal midpath node for communicating the meshnet data. Various other aspects are contemplated.