Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

WebGL Static Hosting with Azure, Web App Service necessary ?

Discussion in 'General Discussion' started by Gordon_G, Oct 26, 2020.

  1. Gordon_G

    Gordon_G

    Joined:
    Jun 4, 2013
    Posts:
    358
    We're looking at a robust and reliable host for our WebGL game.

    One option is to use Microsoft Azure, and there is this fundamental question about what Azure services subscription(s) is/are need to do this that I can't find an answer for:

    As far as I understand it, our WebGL Build is static - that is the WebGL app is downloaded to the browser and runs and there is no need for any server side process to do dynamic content processing.

    Given that, it seems that simple Azure Blob static content hosting is all that is needed. Blob hosting is very inexpensive - as little as $5 / mo.

    However, every single the Azure Unity WebGL tutorial that i have found uses an Azure Web App Service subscription, and there is never any information given that explains why that service is used or if it is necessary.

    The minimum App Service subscription costs 10 times as much as the Blob service, so you see why I am trying to find answers to this issue!

    Thanks for any advice!
     
  2. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,614
    I don't see why you couldn't just use the blob hosting, yeah. Azure have a page about how to do it.

    Main reason to use an actual web service would be if you wanted something that the game could also interact with - e.g. signing into a player account, accessing a leaderboard, etc.
     
    Gordon_G likes this.
  3. Gordon_G

    Gordon_G

    Joined:
    Jun 4, 2013
    Posts:
    358
    Do you have experience using that service to host a WebGL file?

    We are already using PlayFab for authentication and user data storage, so no need any dynamic service with Azure to do that.
     
  4. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,614
    No, I've not used it personally.
     
  5. RLord321

    RLord321

    Joined:
    Feb 25, 2017
    Posts:
    28
    All you need is a basic hosting company. If you want to use Azure, you can but it's definitely not needed just for a WebGL file to host.
     
    Gordon_G likes this.
  6. Gordon_G

    Gordon_G

    Joined:
    Jun 4, 2013
    Posts:
    358
    Hey thanks!

    Do you have experience with WebGL and Azure?

    Yes, I know, I have been dealing with Web hosting services for a number html projects for many years now, but we were thinking we might give cloud hosting a go because of its reliability and robustness.

    With the hosting service I use for my personal web sites I have to upgrade for faster bandwidth more power to handle greater numbers of concurrent requests. I mean, we're hoping to have hundreds of thousands of users all over the globe, and if 1000s of them all open the game at the same time, we need a system at the back end that can deliver it without problems. So we are shopping around.

    It's just not stated in the tutorials if there is something intrinsic in WebGL delivery that requires an Azure Web Service subscription. Do you know for a fact that there is not?
     
  7. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,878
    I have used AWS S3 buckets on large scale enterprise projects with a good degree of success for WebGL, and am still working on a live project that uses this.

    If it works in an S3 bucket I cant see why it would not work in an azure blob.
     
  8. xshadowmintx

    xshadowmintx

    Joined:
    Nov 4, 2016
    Posts:
    47
    I've used this, and there is not.

    You can use an azure storage container for a webGL build.

    It's not entirely without limitations; if your build is wrapped by a frontend framework like angular/vue/react, you may find that the history api limitations on the storage account are problematic; you should instead use the 'Azure Static Web Apps' service for that (azure has so many similar names, Static Web Apps are still not the same as using an app service, and considerably cheaper to host).

    ...anyway, if you're just putting a vanilla WebGL build up, it'll work fine.

    Just FYI though, just remember you pay for traffic, like on S3; "as little as $5 / mo" depends entirely on how many visitors you get.