惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
Attack and Defense Labs
Attack and Defense Labs
V2EX - 技术
V2EX - 技术
O
OpenAI News
S
Secure Thoughts
H
Heimdal Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Schneier on Security
Schneier on Security
H
Hacker News: Front Page
S
Security Affairs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
The Register - Security
The Register - Security
GbyAI
GbyAI
Cloudbric
Cloudbric
MongoDB | Blog
MongoDB | Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
K
Kaspersky official blog
Forbes - Security
Forbes - Security
Y
Y Combinator Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Scott Helme
Scott Helme
Hacker News - Newest:
Hacker News - Newest: "LLM"
The Cloudflare Blog
Recorded Future
Recorded Future
人人都是产品经理
人人都是产品经理
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
Webroot Blog
Webroot Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LangChain Blog
T
Tor Project blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
I
Intezer
V
V2EX
T
Tailwind CSS Blog
SecWiki News
SecWiki News
NISL@THU
NISL@THU
C
Check Point Blog

Kubernetes on CoreDNS: DNS and Service Discovery

kubernetes kubeforward Cluster DNS: CoreDNS vs Kube-DNS Migration from kube-dns to CoreDNS Deploying Kubernetes with CoreDNS using kubeadm Setting up CoreDNS (on AWS) Intro to CoreDNS webinar by John Belamaric How Queries Are Processed in CoreDNS Custom DNS Entries For Kubernetes CoreDNS for Minikube Why CNCF for CoreDNS? CoreDNS for Kubernetes Service Discovery, Take 2 CoreDNS for Kubernetes Service Discovery
Scaling CoreDNS in Kubernetes Clusters
chris · 2018-11-15 · via Kubernetes on CoreDNS: DNS and Service Discovery

I’m sharing the results of some tests I ran with CoreDNS (1.2.5) in Kubernetes (1.12) to provide some reference points for tuning CoreDNS to your cluster. In addition to testing CoreDNS in its default configuration, I tested CoreDNS with the optional autopath plugin enabled. The autopath plugin is an optimization that helps transparently mitigate the DNS performance penalties Pods incur due to Kubernetes’ infamous ndots:5 issue. These tests quantify the memory/performance trade when enabling autopath.

The guides and fomulas in this post are based on a set of tests of clusters in GCE, your mileage may vary. This blog post is a excerpt of the complete results, you can see more detail here.

Memory and Pods

In large scale Kubernetes clusters, CoreDNS’s memory usage is predominantly affected by the number of Pods and Services in the cluster.

CoreDNS in Kubernetes Memory Use

With default CoreDNS settings

To estimate the amount of memory required for a CoreDNS instance (using default settings), you can use the following formula:

MB required (default settings) = (Number of Pods + Services) / 1000 + 54

With the autopath plugin

The autopath plugin is an optional optimization that improves performance for queries of names external to the cluster (e.g. infoblox.com). Enabling the autopath plugin requires CoreDNS to use significantly more memory to store information about Pods.
Enabling the autopath plugin also puts additional load on the Kubernetes API, since it must monitor all changes to Pods.

To estimate the amount of memory required for a CoreDNS instance (using the autopath plugin), you can use the following formula:

MB required (w/ autopath) = (Number of Pods + Services) / 250 + 56

CPU and QPS

Max QPS was tested by using the kubernetes/perf-tests/dns tool, on a cluster using CoreDNS. The two types of queries used were internal queries (e.g. kubernetes), and external queries (e.g. infoblox.com).

With default CoreDNS settings

Single instance of CoreDNS (default settings) on a GCE n1-standard-2 node:

Query Type QPS Avg Latency (ms)
external 67331 12.021
internal 33669 2.608

1 From the server perspective it is processing 33667 QPS with 2.404 ms latency, but from the client perspective, each single name lookup actually comprised 5 serial lookups.

With the autopath plugin

The autopath plugin in CoreDNS is an option that mitigates the ClusterFirst search list penalty. When enabled, it reduces the number of DNS queries a client makes when looking up an external name.

Single instance of CoreDNS (with the autopath plugin enabled) on a GCE n1-standard-2 node:

Query Type QPS Avg Latency (ms)
external 31428 2.605
internal 33918 2.62

Note that the numbers for external queries are much improved here. This is due to the autopath plugin optimization.

The server perspective latency for external queries goes up slightly when autopath is enabled (+8%).
This is because it’s doing the extra work of checking each search domain on the server side.
But since it can answer in one round trip instead of five, the overall client perspective performance is much improved.

More…

For more information about the test environments and how the data was collected, see the full results here.