Search Unity

Feedback Any Reason Why Our Communication With Rest-API and Unity is Slow?

Discussion in 'Multiplayer' started by umityayla, Nov 28, 2019.

  1. umityayla

    umityayla

    Joined:
    May 21, 2019
    Posts:
    26
    We have a Unity3D Game. It sometimes needs to make Rest-API calls to the remote server. Remote server has uwsgi(tried gunicorn, didn't change much)+python+flask+haproxy+mongodb (I just laid out our entire back-end stack). We use proyecto26 on our game as a rest client driver. The problem is, we sometimes get gigantic latency issues. Normally it's around 100-300 ms. But sometimes it spikes up to 13000 ms (13 seconds). But when I try our server with postman. I get latency results around 100-300 ms. Any idea what could be the reason?

    Our Unity version is 2019.1.4f1
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    You could capture the network conversation with Wireshark. When the problem appears, you can look up if it's a delay server-side or if the client is behaving strangely.
    Your client will trigger more work on the server than postman, so it's not a reliable (full) test.