简体   繁体   中英

How to create an instance for every user in an app

I am not sure if the wording in my question is correct but I have had this on my mind for some time and would just like to be pointed into the right direction.

When we build apps in my case a webapp, all the users run and use the same source code right, how do we handle situations where the app needs to produce some files and send them back to the user? Do we queue all the queries and let the app handle them one by one or is there a way to have multiple instances of the app running to handle these requests?

For example an app that uses Vuejs and Nuxtjs to generate static HTML websites, the nuxt framework generates the website and puts all the files in a /dist folder, which are than moved to a Git or server.

Is this the correct way to do it? Have the app create these files concurrently and move them to their destination? What if we have 1000 users at a time, won't this drastically slow down usability of our app?

I am a junior developer and I have never really understood how my code works on the inside if this makes sense, if you could recommend a book on systems architecture or design or something that would help me that would be amazing.

Serving up pre-generated static files with client side javascript, is the minimal drain on a server. Because after the files are delivered all the work is done in the client side (except for future queries).

They are not created on load, like for example with PHP but only served as is.

So the code they are running is really in the client side.

Additionally if you CDN deployment services like Netlify, then delivering static files quickly is a breeze.

Hope that answers your question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM