by rburhum · 10y ago · 0 comments
Most of the times if you use volumes, it's because of poor design[1] than anything else.
[1] modern web-app design guidelines: http://12factor.net/
...Or you could just use SmartOS zones, and then all these artificial problems go away, as zones natively reside on the ZFS filesystem inside of the zpool underneath them. Why would one want to waste one's time on technology which is clearly not finished and doesn't offer any advantages over zones? As a logical being, I'm genuinely perplexed by the overall insistence on Docker. What is the cause of it?
As we've discussed before, there are problems that are inherent to designing distributed systems that are not solved by SmartOS's magic sauce. Please stop pretending that every possible problem that is faced by GNU/Linux technologies has already been solved by SmartOS, it's getting quite tiresome.
"Storage with containers" refers to correctly decoupling the state from your application and storing it a way that allows for horizontal scaling. It's not as simple as proclaiming "we have a magical filesystem, therefore all problems are solved and you should use SmartOS kthxbai". There are harder problems here, and no amount of SmartOS shilling will get around that.
My point is that - even in the case for django configured with S3 in this docker tutorial, there is absolutely no mention of this. The "dockerized Django" example in the documentation destroys your uploaded files every time you restart the container. Most of the "Dockerizing <whatever you want>" that I have read so far miss the maintaining state part. To me, that is overlooking an important point.
Building stateless containers is good practice.
There will always be exceptions but it's good to know the tradeoffs before making those exceptions.
12 Factors only address stateless processes, which is the easy part. But most applications are stateful. It doesn't matter if data are stored in an embedded database (like SQLite, LevelDB, BoltDB) or in a client-server database (like PostgreSQL, MySQL, MongoDB, RabbitMQ, Redis). 12 Factors doesn't address this issue at all.