We have the same problem with the Oracle Database, and we don't have a 500ms latency when our code runs on Linux, on Windows, however, there is a 500ms delay.
We believe that this issue is related to a certain mechanism of TCP, and there are differences in the implementation between Windows and Linux. This is because our Linux is WSL, which is essentially a virtual machine of Windows 10