Search Unity

How most mobile multiplayer game avoid Cloudfront (which integrated from S3 ) error 503 issue.

Discussion in 'Connected Games' started by Sompol_Rznet, Sep 3, 2019.

  1. Sompol_Rznet

    Sompol_Rznet

    Joined:
    Sep 14, 2018
    Posts:
    10
    Hi,

    Just want to know about best practice when we working with online mobile game (Android & iOS) that deploy its server on AWS environment.

    Our problem occurring on when our game download an assets from URL that point to Cloudfront (which got a file from S3 ). Our DevOps already ask for support from AWS, a lot of effort to investigate the issue, cannot solve the problem.
    But we cannot solve it by ourself also, because a root cause of the problem likely to hide in the Cloudfront sourcecode and we don't have permission to investigate it.

    In my project, lately we found error 503 issue more often.
    It might sound weird, but what happen is :
    - It's only occur with our QA test device & their wifi (which a direct line as same as most people use in their home).
    - Our real player didn't encounter this issue regularly. Rare to happen. But just last week it happen quite more often. (Actually it might just the same, but we just add a feature to ensure that player don't need met a infinity loading because the timeout of HTTP lib won't work properly (we using BestHTTP ). We modify our game on top of the BestHTTP to make a timeout work at 60 seconds on each HTTP request / response. But the error 503 was happen almost a year and we don't know how to fix it.)
    - The information we got from our player that ask for support is useful by above feature (we add a hint on screen so when they take sceenshot we would know which HTTP use that cause a problem). But unfortunately, the URL that cause a problem is quite random.
    - We dig down many way until have a conclusion that Couldfront somehow "block" our test device that using our QA Internet connection. Because if we change the Internet by using our personal phone, the things work fine in short period.
    - When issue occur on test device, the URL that cause a problem on downloading an assets would always got error 503 even we use it via Chrome browser on that test device. Always. But if we just use that URL on our PC (which using a corporate global grade ISP), we successfully download that asset without error 503.
    - However, our test device and QA Internet won't get any problem when playing another mobile game.


    So now, instead of investigating the issue in an old ways that we already did.
    I want to know how another mobile game implement and deploy their system to avoiding error 503.
     
  2. doctorpangloss

    doctorpangloss

    Joined:
    Feb 20, 2013
    Posts:
    216
    You should only be using UnityWebRequest directly.

    You should use a locality-appropriate S3 region.

    You may be better off using a CDN appropriate for the locality where the devices are being used. In many parts of the world, traffic is silently or maliciously interfered with, leading to dropped connections by the user's device manufacturer and the ISP.
     
    Sompol_Rznet likes this.