I´m planning for a large website that includes many static assets (js, css, images and thumbnails) in the generated pages. That website will use
TYPO3 as CMS (is is a customer requirement).
I guess I could seriously improve performance / page load times by using a two server setup. One server where the main application (PHP) runs and another one where the static files sit being served by a trimmed down version of apache or something like lighthttpd.
Including e. g. js or css files from the file server is of course no big deal. Just use an absolute url
http://static.example.com/js/main.js and be done with it.
But: that website will have pages with MANY thumbnails of e. g. product images on it. So I see two problems when the main application tries to create a thumbnail of some image:
the original image like
products/some.jpgis uploaded on the static file server and therefore not on the same server as the PHP application which tries to create the thumbnail.
TYPO3 writes created thumbnails to a temp directory which is expected to be on the same server. Therefore, hundreds of thumbnails will be written and served from that temp directory which is on the same server as the main application -> the static file server is in that case basically useless, all thumbnails will be requested from the server of the main application.
So, my question is: how to overcome this shortcomings?
Is it possible to "symlink" some directories to another server?
So, for example, if PHP tries to open the original products image for thumbnail creation with
imagecreate("products/some.jpg") the products folder actually "points" to the products folder on the static image server? I know something like this can be done with
.htaccess but is it possible on file system level?