I am trying to configure a web server so that it can serve web apps using NGINX. We expect to have 15,000 different web apps. Each web app is supposed to be packaged in a SquashFS image, containing a lot of assets (up to 1.5 Gb).
I made a first try to mount 15,000 SquashFS images sequentially in a script, and it takes forever: 40 minutes, during which time the system's performance collapses. I am talking about the mounting, not the actual file serving.
Is there a way to improve this performance? What other file system could I use? In particular, I would be strongly interested in a file system that could be "lazily" mounted, only when NGINX tries to read from the mount point directory.