From cb591f383136b11eedd0d071dab32be372e62068 Mon Sep 17 00:00:00 2001 From: Matt Klein Date: Tue, 13 Mar 2018 16:51:16 -0400 Subject: [PATCH 1/2] docs: add cluster warming information Signed-off-by: Matt Klein --- .../cluster_manager/cluster_stats.rst | 3 ++- docs/root/intro/arch_overview/cluster_manager.rst | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/root/configuration/cluster_manager/cluster_stats.rst b/docs/root/configuration/cluster_manager/cluster_stats.rst index eb3782340..abcdbe283 100644 --- a/docs/root/configuration/cluster_manager/cluster_stats.rst +++ b/docs/root/configuration/cluster_manager/cluster_stats.rst @@ -19,7 +19,8 @@ statistics. Any ``:`` character in the stats name is replaced with ``_``. cluster_added, Counter, Total clusters added (either via static config or CDS) cluster_modified, Counter, Total clusters modified (via CDS) cluster_removed, Counter, Total clusters removed (via CDS) - total_clusters, Gauge, Number of currently loaded clusters + active_clusters, Gauge, Number of currently active (warmed) clusters + warming_clusters, Gauge, Number of currently warming (not active) clusters Every cluster has a statistics tree rooted at *cluster..* with the following statistics: diff --git a/docs/root/intro/arch_overview/cluster_manager.rst b/docs/root/intro/arch_overview/cluster_manager.rst index 90bfe73c5..496716107 100644 --- a/docs/root/intro/arch_overview/cluster_manager.rst +++ b/docs/root/intro/arch_overview/cluster_manager.rst @@ -24,3 +24,17 @@ distribution. * Cluster manager :ref:`configuration `. * CDS :ref:`configuration `. + +Cluster warming +--------------- + +When clusters are initialized both at server boot as well as via CDS, they are "warmed." This means +that clusters do not become available until the following operations have taken place. + +* Initial service discovery load (e.g., DNS resolution, EDS update, etc.). +* Initial active :ref:`health check ` pass if active health checking + is configured. Envoy will send a health check request to each discovered host to determine its + initial health status. + +The previous items ensure that Envoy has an accurate view of a cluster before it begins using it +for traffic serving. From 93a7dcc975ae764ba27a74d506529989e3dd5432 Mon Sep 17 00:00:00 2001 From: Matt Klein Date: Wed, 14 Mar 2018 17:40:06 -0400 Subject: [PATCH 2/2] comment Signed-off-by: Matt Klein --- docs/root/intro/arch_overview/cluster_manager.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/root/intro/arch_overview/cluster_manager.rst b/docs/root/intro/arch_overview/cluster_manager.rst index 496716107..71739a4a3 100644 --- a/docs/root/intro/arch_overview/cluster_manager.rst +++ b/docs/root/intro/arch_overview/cluster_manager.rst @@ -38,3 +38,12 @@ that clusters do not become available until the following operations have taken The previous items ensure that Envoy has an accurate view of a cluster before it begins using it for traffic serving. + +When discussing cluster warming, the cluster "becoming available" means: + +* For newly added clusters, the cluster will not appear to exist to the rest of Envoy until it has + been warmed. I.e., HTTP routes that reference the cluster will result in either a 404 or 503 + (depending on configuration). +* For updated clusters, the old cluster will continue to exist and serve traffic. When the new + cluster has been warmed, it will be atomically swapped with the old cluster such that no + traffic interruptions take place.