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:
- Production, yes or no: is there an real-world example of a large-scale Cassandra in a Swarm/Kubernetes environment? I thought, initially, yes?
- Guidelines like "Cassandra and Docker - Lessons learnt" (Slide 20)
- Docker Official Image packaging for Cassandra on GitHub
- Articles like "Thou shall not run a database in container" or "Why database are not for containers" (related yc debate)
- 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.