Best Guidance on Uploading Permanent Files to Kudu/AppService?

Mike-E-angelo 506 Reputation points
2024-07-24T09:48:52.8733333+00:00

Hello Community,

I am currently integrating a component into my .NET application -- PuppeteerSharp -- which downloads Chrome to the local machine and uses it to take screenshots of loaded files in its tabs. This works wonderfully and I am happy with its results.

However, the hitch is that, to do this, it needs to download Chrome onto the local machine. Depending on the source feed, this can take anywhere from 30-120 seconds (maybe longer). This is a poor experience for the user as this is a long wait.

I am deploying this as an Azure AppService application which means (as I understand it) that each time I deploy the application the downloaded Chrome will be wiped and the above download will take place again for the first user requiring this feature, ensuring the poor experience for a user with every deployment. I would like to avoid this.

What I would ideally like to do is to download this once and only once to the target AppService machine and have this available on Scale-out if necessary.

Is this possible? What is the best guidance on how to do this?

Thank you for any assistance you can provide,

Michael

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,853 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,770 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
928 questions
{count} votes

2 answers

Sort by: Most helpful
  1. ajkuma 26,136 Reputation points Microsoft Employee
    2024-08-01T04:35:54.92+00:00

    Mike-E-angelo, As mentioned in my previous post, enable Always On.

    Based on the requirement, you may leverage Windows Containers and have Chrome as part of the image.

     

    Quickstart:Run a custom container on App Service - Azure App Service | Microsoft Learn

    Just to highlight, all Azure Web Apps (as well as Mobile App/Services, WebJobs and Functions) run in a secure environment called a sandbox**.** Each app runs inside its own sandbox, isolating its execution from other instances on the same machine as well as providing an additional degree of security and privacy which would otherwise not be available. 

     


    If the answer helped (pointed, you in the right direction) > please click Accept Answer - it will help users to find the answers quickly.


  2. Mike-E-angelo 506 Reputation points
    2024-08-08T08:08:45.03+00:00

    In my case creating a container is more work, so I will create another API (Azure Function App? 🤔) that is essentially a microservice that captures images from web pages via Puppeteer. The idea is that it isn't updated as much as the other applications in my system and therefore will not get its filesystem wiped as much, leading to faster response times (and only taking the hit once on the very first download).

    It's unfortunate that there is no way to use the Kudu filesystem but that is the reality of the situation.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.