Re: Storing images in database for web applications

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Storing images in database for web applications
Date: 2009-12-02 11:08:47
Message-ID: hf5hrv$sb3$4@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2009-11-27, Thom Brown <thombrown(at)gmail(dot)com> wrote:
> --0016e659f44c2bea2504795842a7
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi all,
>
> I'm wondering if anyone has experience of storing and getting images to and
> from a database? We currently have the problem of images being uploaded to
> a single gateway used by many companies, most of which run several
> websites. As it stands, once they upload the image, it then has to be
> fsync'd to the appropriate servers (3-way in some cases) or accessed through
> our image proxy.
>
> But now we wish to redesign our various image upload systems into one system
> which will also make images available across various sites/companies and
> therefore servers. So one solution is to store images in a database. What
> I'm wondering is if this is an appropriate solution? What are the
> downsides? Could we expect severe performance hits? To help mitigate the
> issue of many sites continuously querying a database for images, we'd
> implement a caching system, so images would only be queried from the
> database probably around once an hour.
>
> The benefits I can see is that images are managed in one place and
> accessibly easily by all servers. The problem is putting everything in one
> place (all eggs in one basket), so if the server goes down, all sites lose
> their images once their cache has expired... unless we implemented a system
> that falls back to cache if connection fails, even if cache has expired.
>
> Any suggestion? Alternatives?

some sort of broadcasting to share the images as when they are
uploaded, perhaps something based on NNTP or email.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tech 2010 2009-12-02 12:05:24 Re: vacuumdb: vacuuming of database "xy" failed: PANIC: corrupted item pointer: 19227
Previous Message Craig Ringer 2009-12-02 10:51:01 Re: Postgres Dump out of order