pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PostgreSQL on Docker
4+ messages / 3 participants
[nested] [flat]

* PostgreSQL on Docker
@ 2017-02-12 06:06 Dhandapani Shanmugam <postgresql95@gmail.com>
  2017-02-12 15:08 ` Re: PostgreSQL on Docker Johannes Truschnigg <johannes@truschnigg.info>
  0 siblings, 1 reply; 4+ messages in thread

From: Dhandapani Shanmugam @ 2017-02-12 06:06 UTC (permalink / raw)
  To: pgsql-admin

Hi Gurus,

Please advise running a PostgreSQL transactional database in a Docker
container is advisable? I am more concerned if there will be any
performance impact on running heavy loaded transaction on PostgreSQL
deployed on Docker.

-Dhandapani Shanmugam

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: PostgreSQL on Docker
  2017-02-12 06:06 PostgreSQL on Docker Dhandapani Shanmugam <postgresql95@gmail.com>
@ 2017-02-12 15:08 ` Johannes Truschnigg <johannes@truschnigg.info>
  2017-02-14 13:54   ` Re: PostgreSQL on Docker Feike Steenbergen <feikesteenbergen@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Johannes Truschnigg @ 2017-02-12 15:08 UTC (permalink / raw)
  To: Dhandapani Shanmugam <postgresql95@gmail.com>; +Cc: pgsql-admin

On Sun, Feb 12, 2017 at 11:36:48AM +0530, Dhandapani Shanmugam wrote:
> Hi Gurus,
> 
> Please advise running a PostgreSQL transactional database in a Docker
> container is advisable? I am more concerned if there will be any
> performance impact on running heavy loaded transaction on PostgreSQL
> deployed on Docker.

Sure you CAN run an embarassingly stateful system like a RDBMS on a
containerization platform designed to run stateless,
throw-away-and-rebuild-on-a-whim-type services - but the question is, why
would you? What specific problem are you hoping to solve by doing so?

This considered, performance by having Docker (or any other means of
technology that uses Linux namespace- and cgroup-subsystems) in the mix
PROBABLY won't suffer noticeably, UNLESS you get bitten by problems lurking in
the pieces of the puzzle that are storage drivers (AUFS and friends) and
enable container networking, which is not unheard of.

-- 
with best regards:
- Johannes Truschnigg ( johannes@truschnigg.info )

www:   https://johannes.truschnigg.info/
phone: +43 650 2 133337
xmpp:  johannes@truschnigg.info

Please do not bother me with HTML-email or attachments. Thank you.

Attachments:

  signature.asc (application/pgp-signature, 818B) download

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: PostgreSQL on Docker
  2017-02-12 06:06 PostgreSQL on Docker Dhandapani Shanmugam <postgresql95@gmail.com>
  2017-02-12 15:08 ` Re: PostgreSQL on Docker Johannes Truschnigg <johannes@truschnigg.info>
@ 2017-02-14 13:54   ` Feike Steenbergen <feikesteenbergen@gmail.com>
  2017-02-17 07:54     ` Re: PostgreSQL on Docker Dhandapani Shanmugam <postgresql95@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Feike Steenbergen @ 2017-02-14 13:54 UTC (permalink / raw)
  To: Johannes Truschnigg <johannes@truschnigg.info>; +Cc: Dhandapani Shanmugam <postgresql95@gmail.com>; pgsql-admin

On 12 February 2017 at 16:08, Johannes Truschnigg <johannes@truschnigg.info>
wrote:
> Sure you CAN run an embarassingly stateful system like a RDBMS on a
> containerization platform designed to run stateless,

Running (Docker) containers does not necessitate running stateless, many
properties of Docker are very useful for stateful systems, I'm thinking of
- isolation between environments
- deploying tested and verified Docker images
- allowing your developers to use the same Docker image as production

> the pieces of the puzzle that are storage drivers (AUFS and friends) and
> enable container networking, which is not unheard of.

An example of a pattern that avoids these issues, but does give you the
isolation and deployment benefits is:

- run 1 container on 1 node
- use bind mounts
- use --net=host

e.g.: docker run -ti -v /pgdata/abc:/var/lib/postgresql/data --net=host
postgres

I'm still on the fence whether or not running PostgreSQL inside containers
is
advisable or not, I've actively ran many instances successfully without any
major issues. I'm currently thinking that if you run a lot of small
databases
for many teams (a Database as a Service) it would be valueable. If you
however
want to squeeze all the performance out of your single large database it
might
not be the best way of running your system.

regards,

Feike

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: PostgreSQL on Docker
  2017-02-12 06:06 PostgreSQL on Docker Dhandapani Shanmugam <postgresql95@gmail.com>
  2017-02-12 15:08 ` Re: PostgreSQL on Docker Johannes Truschnigg <johannes@truschnigg.info>
  2017-02-14 13:54   ` Re: PostgreSQL on Docker Feike Steenbergen <feikesteenbergen@gmail.com>
@ 2017-02-17 07:54     ` Dhandapani Shanmugam <postgresql95@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Dhandapani Shanmugam @ 2017-02-17 07:54 UTC (permalink / raw)
  To: Feike Steenbergen <feikesteenbergen@gmail.com>; +Cc: Johannes Truschnigg <johannes@truschnigg.info>; pgsql-admin

Thank You Feike and Johannes

On Tue, Feb 14, 2017 at 7:24 PM, Feike Steenbergen <
feikesteenbergen@gmail.com> wrote:

> On 12 February 2017 at 16:08, Johannes Truschnigg <
> johannes@truschnigg.info> wrote:
> > Sure you CAN run an embarassingly stateful system like a RDBMS on a
> > containerization platform designed to run stateless,
>
> Running (Docker) containers does not necessitate running stateless, many
> properties of Docker are very useful for stateful systems, I'm thinking of
> - isolation between environments
> - deploying tested and verified Docker images
> - allowing your developers to use the same Docker image as production
>
> > the pieces of the puzzle that are storage drivers (AUFS and friends) and
> > enable container networking, which is not unheard of.
>
> An example of a pattern that avoids these issues, but does give you the
> isolation and deployment benefits is:
>
> - run 1 container on 1 node
> - use bind mounts
> - use --net=host
>
> e.g.: docker run -ti -v /pgdata/abc:/var/lib/postgresql/data --net=host
> postgres
>
> I'm still on the fence whether or not running PostgreSQL inside containers
> is
> advisable or not, I've actively ran many instances successfully without any
> major issues. I'm currently thinking that if you run a lot of small
> databases
> for many teams (a Database as a Service) it would be valueable. If you
> however
> want to squeeze all the performance out of your single large database it
> might
> not be the best way of running your system.
>
> regards,
>
> Feike
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2017-02-17 07:54 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-02-12 06:06 PostgreSQL on Docker Dhandapani Shanmugam <postgresql95@gmail.com>
2017-02-12 15:08 ` Johannes Truschnigg <johannes@truschnigg.info>
2017-02-14 13:54   ` Feike Steenbergen <feikesteenbergen@gmail.com>
2017-02-17 07:54     ` Dhandapani Shanmugam <postgresql95@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox