TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Stateful Apps on Kubernetes: A quick primer

139 pointsby loiselleatworkabout 7 years ago

6 comments

bajsejohannesabout 7 years ago
I would recommend against running stateful apps in kubernetes. It&#x27;s not really ready for it. Big problems include routing (it works fine for http requests, but not for DBs, message brokers, etc) and just the pain of setting up stateful sets.<p>If you don&#x27;t believe me, take it from someone who should know what they&#x27;re talking about: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;kelseyhightower&#x2F;status&#x2F;963413508300812295" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;kelseyhightower&#x2F;status&#x2F;96341350830081229...</a>
评论 #16973481 未加载
评论 #16973181 未加载
评论 #16973272 未加载
评论 #16974003 未加载
rrdharanabout 7 years ago
&gt; Because Kubernetes itself runs on the machines that are running your databases, it will consume some resources and will slightly impact performance. In our testing, we found an approximately 5% dip in throughput on a simple key-value workload.<p>5% seems like a surprisingly large overhead. What is k8s doing in this situation that would have that kind of impact?
评论 #16972804 未加载
评论 #16972834 未加载
stefanatfrgabout 7 years ago
I&#x27;d like to know how to solve the storage dilution problem with stateful apps in k8s where you have to buy 3-18x more raw capacity than desired to meet availability &amp; durability guarantees.<p>For example if you ran CDB on a baremetal cluster of 3 nodes with 30TB of raw capacity, 15TB is lost to RAID10, 10TB is lost to running a replicated database such as cockroach DB, leaving you with 5TB effective capacity which is a 1&#x2F;6 dilution of your initial capacity.<p>If you ran cockroach DB on a replicated network volume, with a replication factor of three, it gets worse. If you bought 30 TB of disks, you&#x27;d lose 20 TB to volume replication, ~6.67TB to CDB replication leaving you with 3.3TB of effective capacity or a 1&#x2F;9 dilution. If those disks were configured with RAID your effective capacity would drop to a 1&#x2F;18 dilution.<p>You could achieve a 1&#x2F;3 dilution which is the effective minimum for a replicated database if you didn&#x27;t configure RAID, but you increase the impact of disk failure, in that it would take much much longer to recover a cluster.
lowbloodsugarabout 7 years ago
&gt;Given its pedigree of literally working at Google-scale<p>I understood that a team at google developed k8s but google doesn&#x27;t actually run it for their &quot;google-scale&quot; workloads. Am I misinformed?
评论 #16972583 未加载
评论 #16973604 未加载
daxfohlabout 7 years ago
Has anyone looked at Service Fabric (Microsoft tech) for things like this? That has offered stateful services for years now. I&#x27;m pretty sure it runs on Linux, and I&#x27;ve seen that it&#x27;s Docker compatible. I know it&#x27;s kinda in the same space as K8s but I don&#x27;t really know the details. Would SF be able to do something like this in a similar (or better?) way?
评论 #16972986 未加载
评论 #16975501 未加载
tapirlabout 7 years ago
Are there any cloud providers providing remote disks without replications? It looks such needs are popular for deploying databases in which replications are maintained by the databases themselves.
评论 #16973850 未加载