There is a system whose architecture at the time of development was as follows:
+--------+ http | server | <------> +--------+ | nginx | | uwsgi | | django | | db | +--------+ But when starting up in the future into battle, I would like to have scalability and fault tolerance of the system, so the modules were separated from each other:
http +-------+ +-------+ +-------+ <------> | nginx | <---> | app | <---> | db | +-------+ +-------+ +-------+ | uwsgi | | django| +-------+ There was a problem with loading images, or rather, in returning the image to the user after loading, since nginx out of the box does not know how to get into the file system of another server. In this regard, there were two ideas on how to solve this problem:
- Using
sambacreate a shared folder betweennginxand theapp, into whichdjangowill upload images, and from whichnginxwill pull them when prompted; - Use
FileWrapperto let theappknow how to send images to a request fromnginx. - Put on the
appsoftware for issuing downloaded images:nginxorapache.
Can you give arguments, which of these solutions is better to use, or bring your decision?

rsyncbetter, then write what it is better for. - MichaelPak