<p>Since you posted your original question, Datastax has come out with dockerized images of datastax enterprise, along with a comprehensive guide. I'd start with <a href="https://github.com/datastax/docker-images/blob/master/README.md" rel="nofollow noreferrer">this reference</a> and maybe check out this older "<a href="http://www.datastax.com/wp-content/uploads/resources/DataStax-WP-Best_Practices_Running_DSE_Within_Docker.pdf" rel="nofollow noreferrer">Best Practices</a>" doc, although some details might have changed.</p>

CC BY-SA 3.0
2018-03-20T16:24:02.683Z
2018-03-20T16:24:02.683Z
LHWizard
<p>Being new to this topic, I have found quite many pros and cons about making data persistent while working with dockerized Cassandra. However, most of it was posted in 2016.</p>

<p>Now, I understand that it can depend on the specific case, but already googling the very question reveals a lot of debate which appears sometimes opiniated (and maybe also historically related to earlier versions of Docker and Cassandra which might have been improving over time and will in future, but maybe there is a conceptual flaw). </p>

<p>So I post this question to differentiate the pros and cons in a non-opiniated way in order to support finding a source or an answer which allows an architectural decision based on facts (or draws a working example, even for a specific case).</p>

<p>Myself is quite biased to Docker but as a DevOps engineer I think I have to learn which things work and which not, also understanding the WHY behind <em>both</em>.</p>

<p><em>Pros or seems to be quite ok but to prove:</em></p>

<ol>
<li>Production, yes or no: is there an real-world example of a large-scale Cassandra in a Swarm/Kubernetes environment? I thought, initially, yes? </li>
<li>Guidelines like "<a href="https://www.slideshare.net/planetcassandra/cassandra-and-docker-lessons-learnt" rel="nofollow noreferrer">Cassandra and Docker - Lessons learnt</a>" (Slide 20)</li>
<li><a href="https://github.com/docker-library/cassandra" rel="nofollow noreferrer">Docker Official Image packaging for Cassandra</a> on GitHub </li>
</ol>

<p><em>Cons/Criticism:</em></p>

<ol>
<li>Articles like "<a href="http://patrobinson.github.io/2016/11/07/thou-shalt-not-run-a-database-inside-a-container/" rel="nofollow noreferrer">Thou shall not run a database in container</a>"  or "<a href="https://myopsblog.wordpress.com/2017/02/06/why-databases-is-not-for-containers/" rel="nofollow noreferrer">Why database are not for containers</a>" (<a href="https://news.ycombinator.com/item?id=13582757" rel="nofollow noreferrer">related yc debate</a>)</li>
<li>A colleague told me, Cassandra would store data associated with IP addresses and this makes usage of Docker/Cassandra not possible if you need data persistence - can't yet google up this but if there is no workaround this will make persistence impossible in my opinion.</li>
</ol>

<p><strong>Side note.</strong> Sometimes they say also, "don't do it in production #1, but integration environment is okay also without persistency #2". I want to learn more about #1 through this question and can't agree with #2 because sometimes you can have a huge effort to prepare already the sample data you need in the integration environment because the production data is yet bigger/complexer. </p>

CC BY-SA 3.0
2017-08-23T07:44:02.007Z
I have running in a semi-production environment elasticsearch and cassandra with data persistence as a stand alone DBs but it's a low usage environment. 
I wouldn't like to have this environment with a lot of nodes in a critical environment but I think the key is to perform enought performence tests to see if the performance obtained meet your requirements
Casasndra doesn't need the IP for storage the information but also for comunicating with other nodes due to goship protocol. If you have replicated the information you won't have any problem
RuBiCK
<docker><cassandra>
Cassandra persistence with Docker - is an example of a comprehensive, up-to-date and facts-based guideline for a deployment architecture available?
Ta Mu
# Cassandra persistence with Docker - is an example of a comprehensive, up-to-date and facts-based guideline for a deployment architecture available?

(Asked by: username_0 on 2017-08-23)

Being new to this topic, I have found quite many pros and cons about making data persistent while working with dockerized Cassandra. However, most of it was posted in 2016.

Now, I understand that it can depend on the specific case, but already googling the very question reveals a lot of debate which appears sometimes opiniated (and maybe also historically related to earlier versions of Docker and Cassandra which might have been improving over time and will in future, but maybe there is a conceptual flaw).

So I post this question to differentiate the pros and cons in a non-opiniated way in order to support finding a source or an answer which allows an architectural decision based on facts (or draws a working example, even for a specific case).

Myself is quite biased to Docker but as a DevOps engineer I think I have to learn which things work and which not, also understanding the WHY behind *both*.

*Pros or seems to be quite ok but to prove:*

1. Production, yes or no: is there an real-world example of a large-scale Cassandra in a Swarm/Kubernetes environment? I thought, initially, yes?
2. Guidelines like "[Cassandra and Docker - Lessons learnt](https://www.slideshare.net/planetcassandra/cassandra-and-docker-lessons-learnt)" (Slide 20)
3. [Docker Official Image packaging for Cassandra](https://github.com/docker-library/cassandra) on GitHub

*Cons/Criticism:*

1. Articles like "[Thou shall not run a database in container](http://patrobinson.github.io/2016/11/07/thou-shalt-not-run-a-database-inside-a-container/)" or "[Why database are not for containers](https://myopsblog.wordpress.com/2017/02/06/why-databases-is-not-for-containers/)" ([related yc debate](https://news.ycombinator.com/item?id=13582757))
2. A colleague told me, Cassandra would store data associated with IP addresses and this makes usage of Docker/Cassandra not possible if you need data persistence - can't yet google up this but if there is no workaround this will make persistence impossible in my opinion.

**Side note.** Sometimes they say also, "don't do it in production #1, but integration environment is okay also without persistency #2". I want to learn more about #1 through this question and can't agree with #2 because sometimes you can have a huge effort to prepare already the sample data you need in the integration environment because the production data is yet bigger/complexer.

**Tags:** docker, cassandra

> **Comments:**
> **username_1**: I have running in a semi-production environment elasticsearch and cassandra with data persistence as a stand alone DBs but it's a low usage environment.  I wouldn't like to have this environment with a lot of nodes in a critical environment but I think the key is to perform enought performence tests to see if the performance obtained meet your requirements Casasndra doesn't need the IP for storage the information but also for comunicating with other nodes due to goship protocol. If you have replicated the information you won't have any problem  

---

## 1 answers

### Answer by username_2 on 2018-03-20. Score: 2

Since you posted your original question, Datastax has come out with dockerized images of datastax enterprise, along with a comprehensive guide. I'd start with [this reference](https://github.com/datastax/docker-images/blob/master/README.md) and maybe check out this older "[Best Practices](http://www.datastax.com/wp-content/uploads/resources/DataStax-WP-Best_Practices_Running_DSE_Within_Docker.pdf)" doc, although some details might have changed.


---

