A method including receiving, by a first device from a second device in a mesh network, coordination information including identification information that identifies an optimal midpath node and timing information that indicates a connection time associated with connecting with the optimal midpath node to enable utilization of the optimal midpath node for communicating meshnet data between the first device and the second device; and transmitting, by the first device, connection information to connect with the optimal midpath node based at least in part on utilizing the identification information. Various other aspects are contemplated.