I have python web app (WSGi) which is deployed using uwsgi and nginx. I am going to provide this app to many users (customers) - each user will have his own settgins, database, templates, data folder etc. The code of the app can be shared.
My original idea was to have one uwsgi process per customer. But it is quite wasteful approach, because currently the app has about 100MB memory footprint. I expect that most of these instances will be sleeping most of the time (max 500 requests per day).
I came up with this solution:
The app will be modified in the way, that one instance may serve for more customers. Based on the requested domain, it will prepare (load) the right settings, database connection etc. for that customer.
Is this good idea? Or should I rather focus on lowering the memory footprint?
Thank you for your answers!