Live data from Hacker News

Why Databases Are Not for Docker Containers

myopsblog.wordpress.com

101–110 of 184 posts

Re: Why Databases Are Not for Docker Containers

#101
post #78

Earlier quoted context omitted.

Seems like a straw-man. Why is a process running within a container failing over more frequently than a process running directly on bare metal -- seems like more of a resource/process scheduling issue than anything to do with containers.

Leaving aside there's now yet another abstraction layer to have bugs, it is not a straw-man to imply that current container technology is not as reliable as bare metal. Or do you mean that Docker etc. are as reliable as bare metal? Heck, you can go on Docker's webpage ( https://www.docker.com/what-docker ). Notice that while they make the claims that Docker is- 1. More lightweight 2. 'Open'/run anywhere 3. Secure The…

At no time was the claim made that containers were more reliable than any other method of running a process, only that running a process within a container is not inherently less reliable than un-contained.

Unless you've gone out of your way, Docker (as well as other Linux container systems) are just namespacing your process. There's no extra abstraction layer, it's just a more restricted execution environment.

Re: Why Databases Are Not for Docker Containers

#102
post #17

I still can't really figure out what a container is. Every time I think of a use case for one, I read something like this which says that's a terrible idea. The use-case I need solved most often is the following: Create a standalone "server" that accepts and responds to network traffic, has some way to store data, and whose dependencies (i.e. system packages, frameworks, etc) I can manage independently of any of the…

It's basically just a chroot but with additional levels of isolation that make a process think it's running in its own copy of an OS in addition to running on its own filesystem (as with a simple chroot). So it's similar to the concept of a virtual machine but it "virtualizes" the OS kernel instead of the hardware.

See here: https://en.wikipedia.org/wiki/LXC

Re: Why Databases Are Not for Docker Containers

#103
post #97

Earlier quoted context omitted.

Leaving aside there's now yet another abstraction layer to have bugs, it is not a straw-man to imply that current container technology is not as reliable as bare metal. Or do you mean that Docker etc. are as reliable as bare metal? Heck, you can go on Docker's webpage ( https://www.docker.com/what-docker ). Notice that while they make the claims that Docker is- 1. More lightweight 2. 'Open'/run anywhere 3. Secure The…

This conversation should distinguish between Docker as a product and container technology in general. A lot of issues that people encounter with Docker specifically disappear if you run Kubernetes (such as volume management), simply by ignoring what Docker does and doing something sane instead. > Or do you mean that Docker etc. are as reliable as bare metal? This doesn't really mean anything, Docker the product has a…

Of course Namespace in Linux kernel is very mature. But if that's all people use, then there wouldn't be a need for Docker and its extra features- people would still be using LXC (no disrespect to LXC). People have to evaluate the entire software as a whole, instead of just looking at the core technology. I personally feel that Docker is still unproven in terms of maturity. Stateless? Hell yes. Stateful app? Well...

As you said, a lot of problems would disappear if people use Kubernetes instead of Docker. At the same time, a lot of replication problems would disappear if people use PostgreSQL instead of MySQL. My point is, when a novice mixes immature technology with immature technology, he is going to have more issues than what's necessary.

Re: Why Databases Are Not for Docker Containers

#104
"You may corrupt the data in case of container crash where database didn’t shutdown correctly. And lose the most important part of your service."

This is the point in the article where you know you don't need to read the rest. If your data integrity hinges on your database being able to shut down correctly you will be disappointed.

The author believes in fairytales.

Re: Why Databases Are Not for Docker Containers

#106
post #98

Earlier quoted context omitted.

Yeah volumes skip unionfs. This article is full of FUD. The author demonstrates they don't really have enough experience to make these claims. I wonder if google has database nodes in containers? Kubernetes is adding the features for containers now. I think it is stable now.

> I wonder if google has database nodes in containers? Yes

Kubernetes

Re: Why Databases Are Not for Docker Containers

#107
Why is running a DB in Docker so different from running in an OpenVZ VPS? There are millions of Wordpress websites and other PHP CMS-es hosted in OpenVZ VPS-es, running MySQL reliably.

Also, Discourse.org's default setup is PostgreSQL hosted in a Docker container, it also has probably 1-10 thousand live forums and is a reliable platform.

Re: Why Databases Are Not for Docker Containers

#108
The basic problem is that a database server is not what Docker is trying to containerize. They want to containerize applications which used to be clear cut things. They used to be single purpose things built by compiling and linking some source code into a single binary. They did not contain everything including the kitchen sink and a plumbing kit complete with automatic drain clearing snake.

Today's database server, and this includes more than just the RDBMSes, are actually a collection of applications. Even if the developers have the bright idea of integrating it all into one binary, it is still not a traditional app. It is a collection of apps built into one binary, like busybox.

To truly dockerize a db server, it would need to be built differently, as a collection of separate, semi-independent apps, that have clearly defined interfaces between each other. Until that day arrives better to use something like Ansible to manage your monolithic db server on it's own instance.

Docker doesn't buy you anything with db servers because you generally want stability. I know some people are experimenting with highly scalable clusters of db servers, and using things like MySQL in a way that was never intended, but they know they are on the bleeding edge. I also expect them to soon start hacking away the bits of the RDBMS monolith that they do not need, and building single purpose cluster members that only do one of the jobs in a normal RDBMS. It might work; give them time.

But if you have to run a db to support your business, don't do it with Docker. I run PostgreSQL and right beside the monolithic RDBMS there is a docker host that runs miscellaneous support stuff like serving up pgBadger data, running a REST interface to data, running an app that listens to PostgreSQL NOTIFY events using Camel pgconnect, and some other admin tools (simple webapps to do db related stuff). Docker has a role, but running the main RDBMS is not it.

Re: Why Databases Are Not for Docker Containers

#109
post #54

This article is terrible. It's a lot of wishy-washy explanations devoid of technical detail - because their isn't a technical explanation or justification for this list. I've run extensive benchmarks of Hadoop/HBase in Docker containers, and there is no performance difference. There is no stability difference (oh a node might crash? Welcome to thing which happens every day across a 300 machine cluster). Any clustered…

I've run Oracle in a container, ugh what a pig, though it can be done. It's great for development, since you can checkpoint state, pass it around and have 99 containers of bugs on the ground. At the end of the day, the data and database is run on some production instance that runs on a fully bare hypervisor at TopGuy (TM) cloud provider. This is enough so that everyone feels more or less good about their situation.

> I've run Oracle in a container

Danger, danger

https://www.theregister.co.uk/2016/02/24/oracle_vmware_licen...

Re: Why Databases Are Not for Docker Containers

#110

Why is running a DB in Docker so different from running in an OpenVZ VPS? There are millions of Wordpress websites and other PHP CMS-es hosted in OpenVZ VPS-es, running MySQL reliably. Also, Discourse.org's default setup is PostgreSQL hosted in a Docker container, it also has probably 1-10 thousand live forums and is a reliable platform.

Because OpenVZ has a philosophy of the container as a simple VM running many processes just like a server does, but Docker is being developed as a container which runs one process which only communicated with other processes through defined interfaces which you configure when you create the container. Docker makes it easier to scale up and down, and to move stuff bewteen servers, but you need to do more work up front.

There never is one true solution that works for everything. Typically, there are solutions which work well for all the small stuff but not so good for a few big things. Docker works great for all the small stuff. A mission critical database is often the one big thing that is the exception.

Also, Docker is not the only way to handle all the small things. LXD works well. Some companies can live on AWS Lambda Functions. Looking for the Holy Grail of one ring to do it all and in the darkness bind them makes for an interesting lifelong quest, but IMHO you will never get there.

Post reply on HN