TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Docker Swarm Experiences: Advantages or Disadvantages?

6 点作者 jonballant大约 7 年前
Has anyone had any experiences putting Docker Swarm into production? What did you use it for and what was your experience?

3 条评论

marcc大约 7 年前
I have experience running production stacks on Swarm, Kubernetes and ECS. I think the best way to talk about running Swarm stacks in production is to compare it to other orchestration runtimes.<p>Swarm has a really low learning curve. You can simply write a docker-compose.yml that defines your stack and then run it. The syntax of a docker-compose yaml is likely familiar to many developers who have been using Docker, so that is a huge advantage when adopting. It&#x27;s a version 3.3 YAML, not the standard docker-compose, but the changes are pretty minor.<p>Swarm stacks come with a built-in overlay (software-defined) network. Services can be identified using in-cluster DNS that round-robins to all containers running that service. This mostly works well, but it&#x27;s been a challenge to depend on at scale. When a service is rescheduled due to failure, we&#x27;ve seen some instances where requests are dropped.<p>Swarm services are just less specialized than k8s ones, which is the tradeoff for a more approachable, easy-to-use runtime. There&#x27;s no deployment, service, load balancer, etc. You just run services that depend on other services.<p>Swarm&#x27;s &quot;depends_on&quot; syntax is simpler, but less robust than what Kubernetes offers.<p>Swarm&#x27;s secrets are amazing, and really great, but you have to build for them. The idea is that a Swarm Secret doesn&#x27;t just exist in an unencrypted environment variable, but it&#x27;s a secured file on disk in the container. The team at Docker did a great job here.<p>While I&#x27;m a huge fan of Kubernetes and continuing to push Kubernetes adoption for some of our services, we also use a decent amount of Swarm and plan to continue.<p>Finally, I do worry a little about the Swarm scheduler&#x27;s future. If anyone from Docker is around, it would be great to hear from them on this. Since they are pushing Kubernetes also, it does make me hesitate to recommend Swarm for a new service, with the risk that it will be end-of-lifed soon.
评论 #16771118 未加载
raarts大约 7 年前
I did. Experience was generally good. Swarm pros: simpler, much shorter configuration files. cons: authentication requires paid version, not possible to divide a Swarm into independent virtual swarms. Another con: even though I am a fan, I fear for its future since development seems to be slowing.
评论 #16771125 未加载
BretFisher大约 7 年前
I work almost exclusively with people learning Swarm, and companies deploying Swarm. In Sacramento, CA today at MuraCon conference listening to stories of teams I&#x27;ve never met, taking Docker Swarm CE into production. Most I see start out deploying it for web services, web sites, worker jobs, then maybe dipping into persistent data containers with something like REX-Ray for shared storage. 18.03 is the latest Docker CE release and solid afaik. The dev-to-prod workflow is pretty great woth docker-compose to Swarm Mode. See my DockerCon talk <a href="https:&#x2F;&#x2F;dockercon.docker.com&#x2F;watch&#x2F;WdAeLaLuSCNQwEp61YVXUt" rel="nofollow">https:&#x2F;&#x2F;dockercon.docker.com&#x2F;watch&#x2F;WdAeLaLuSCNQwEp61YVXUt</a> and my YouTube Channel on stuff I just started doing <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;c&#x2F;BretFisherITPro" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;c&#x2F;BretFisherITPro</a> and I also have articles and courses at <a href="https:&#x2F;&#x2F;bretfisher.com" rel="nofollow">https:&#x2F;&#x2F;bretfisher.com</a>
评论 #16792247 未加载