Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you store images in the database, you take an extra database hit <em>plus</em> you lose the innate caching/file serving optimizations in your web server. Apache will serve a static image much faster than PHP can manage it.</p> <p>In our large app environments, we use up to 4 clusters:</p> <ul> <li>App server cluster</li> <li>Web service/data service cluster</li> <li>Static resource (image, documents, multi-media) cluster</li> <li>Database cluster</li> </ul> <p>You'd be surprised how much traffic a static resource server can handle. Since it's not really computing (no app logic), a response can be optimized like crazy. If you go with a separate static resource cluster, you also leave yourself open to change just that portion of your architecture. For instance, in some benchmarks <a href="http://www.lighttpd.net/" rel="nofollow noreferrer">lighttpd</a> is even faster at serving static resources than apache. If you have a separate cluster, you can change your http server there without changing anything else in your app environment.</p> <p>I'd start with a 2-machine static resource cluster and see how that performs. That's another benefit of separating functions - you can scale out only where you need it. As far as synchronizing files, take a look at existing <a href="http://en.wikipedia.org/wiki/File_synchronization" rel="nofollow noreferrer">file synchronization</a> tools versus rolling your own. You may find something that does what you need without having to write a line of code.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload