I see that you only wrote that the device will send data to the server, but did not write that the server will push data to the device. If this is the case, then it is not impossible to use the HTTP protocol. If there is a two-way demand, but data is uploaded at certain intervals and is not transmitted in real time, you can consider using non-blocking IO to achieve it. In this way, the IO response is sent to the bottom layer of the system, and the Java layer only needs to transmit data again. Just create a thread for processing, which can reduce thread overhead. If there are really 200 device connections, 200 devices will be uploading at the same time and transmitting data continuously. The only way is to upgrade the configuration, and other methods will be thankless.
I see that you only wrote that the device will send data to the server, but did not write that the server will push data to the device. If this is the case, then it is not impossible to use the HTTP protocol. If there is a two-way demand, but data is uploaded at certain intervals and is not transmitted in real time, you can consider using non-blocking IO to achieve it. In this way, the IO response is sent to the bottom layer of the system, and the Java layer only needs to transmit data again. Just create a thread for processing, which can reduce thread overhead. If there are really 200 device connections, 200 devices will be uploading at the same time and transmitting data continuously. The only way is to upgrade the configuration, and other methods will be thankless.
You can consider golang’s coroutine concept