cancel
Showing results for 
Search instead for 
Did you mean: 

Front End in Cluster deployment and Media Storage in Database

Front End in Cluster deployment and Media Storage in Database

Hi,

My config:

- MySql as main DB on separate node

- Admin node 

- 2 x Front End nodes

 

Media are stored in database.

 

I am running in strange problem and need some advice.

 

When accessing Front End node all product photos (media/catalog/product) are fetched from db and stored on local file system as required. However any other photos for example from media/catalog/category or media/any_plugin etc are not being pulled out from the db and getting 404. Checked and all files are stored in db. 

I have then explored a bit and created redirection rule in nginx config:

 location /media/ {
 try_files $uri $uri/ /get.php?$args;
}

This improved a bit however:

- all photos from media/catalog/product are duplicated on customer browser (downloaded twice)

- there are still some of the files from media/any_plugin not being pulled from db to fs

 

Just wondering what are the rules when storing media in DB and what should be configured and how?

Thanks a lot!