[Catalyst] Serving "static" content from DB

Cosimo Streppone cosimo at streppone.it
Sat Jun 6 19:25:09 GMT 2009

Mihai Bazon <mihai at bazon.net> wrote:

> John Romkey <romkey at apocalypse.org> wrote:
>> On Jun 6, 2009, at 7:41 AM, Ian Docherty wrote:
>> > Mihai Bazon wrote:
>> >> Hi folks,

> I am aware of the performance quirks


> MySQL blobs are pretty fast, btw.

Ah :)

I'm interested about this. Do you have numbers?

> Performance should be (almost) the same as for static files if I
> implement a handler that (1) updates the static file from DB when it's
> out of date and (2) DECLINE-s the request so that Apache^W the web
> server itself can further serve the file.

Performance can be almost the same. Scalability won't.
But of course you are the only person that can evaluate that
depending on your needs, requirements, etc...


> When the need comes, I'll figure out something faster
> -- but for now all I can think of is "early
> optimization is the root of all evil". ;-)

I know a team that thought exactly the same, did exactly
the same as you are planning to do (even pictures in the db),
served from the db and scaled on the fly by CGI processes.

(and don't underestimate backend<->db network traffic)

That became my team some time ago, and we spent
_months_ to destroy that monster and serve those
content as completely static by lightweight httpd servers.

I'm not saying you should change anything, but think
about the poor souls who shall maintain the system
in the hypotetical future where you get, as we do,
millions of hits/day.


More information about the Catalyst mailing list