There is a server that at exactly 0: 00: 00.000 starts the next competition: the one whose post request comes first will receive a virtual prize, while everyone else will not receive anything. For each response, north returns the serverTime parameter, which contains the server time to the nearest millisecond. The server is located somewhere in California, I rented a server in the same place and am trying to win this competition. I use Java and the OkHttp library in http2 mode, send a sighting post request for 10 seconds to the required time (which takes about 1 second), then synchronize the time via ntp and send the request in advance so that it comes to the server as close as possible to the right time. According to the results of the experiments, I send a request in 22 ms to the required time, the request itself takes from 29 to 40 ms and always arrives at the server in different ways. When at 999 ms of the previous hour, when at 001 ms, when at 004, and when at 016. I lose this competition with enviable regularity, and what would you do in my place to prevent such defeats?) Specifications: speed Internet on the server, according to the speedtest: 700/400 Mbps, ping to the desired IP address: 1.4 ms Any possible solutions are possible: rent another server, change the programming language and library, etc.

  • а что бы вы сделали на моем месте - would not participate in this nonsense :) - NewView
  • You do not create OkHttpClient again after a preliminary request? - Zergatul 5:46 pm
  • @Zergatul, no, of course, otherwise what is the meaning of this request?) - Valentine

0