<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Task on PIG.CENTER</title><link>https://pig.center/categories/task/</link><description>Recent content in Task on PIG.CENTER</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Tue, 08 Sep 2026 21:29:01 +0800</lastBuildDate><atom:link href="https://pig.center/categories/task/index.xml" rel="self" type="application/rss+xml"/><item><title>Usage: pgbouncer command</title><link>https://pig.center/docs/pgbouncer/usage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/pgbouncer/usage/</guid><description>&lt;hr&gt;&#10;&lt;h2 id="synopsis"&gt;Synopsis&#10;&lt;/h2&gt;&#10;&lt;pre&gt;&lt;code&gt;pgbouncer [-d][-R][-v][-u user] &amp;lt;pgbouncer.ini&amp;gt;&#10;pgbouncer -V|-h&#10;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;p&gt;On Windows, the options are:&lt;/p&gt;&#10;&lt;pre&gt;&lt;code&gt;pgbouncer.exe [-v][-u user] &amp;lt;pgbouncer.ini&amp;gt;&#10;pgbouncer.exe -V|-h&#10;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;p&gt;Additional options for setting up a Windows service:&lt;/p&gt;&#10;&lt;pre&gt;&lt;code&gt;pgbouncer.exe --regservice &amp;lt;pgbouncer.ini&amp;gt;&#10;pgbouncer.exe --unregservice &amp;lt;pgbouncer.ini&amp;gt;&#10;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="description"&gt;Description&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;pgbouncer&lt;/strong&gt; is a PostgreSQL connection pooler. Any target application&#10;can be connected to &lt;strong&gt;pgbouncer&lt;/strong&gt; as if it were a PostgreSQL server,&#10;and &lt;strong&gt;pgbouncer&lt;/strong&gt; will create a connection to the actual server, or it&#10;will reuse one of its existing connections.&lt;/p&gt;</description></item><item><title>PostgreSQL Logging Configuration</title><link>https://pig.center/docs/pgbadger/postgresql-logging/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/pgbadger/postgresql-logging/</guid><description>&lt;p&gt;pgBadger can only report information that PostgreSQL writes to the log. Start with a parseable prefix and a deliberate statement-logging policy, then add the operational events you want to analyze.&lt;/p&gt;&#10;&lt;h2 id="minimum-query-logging"&gt;Minimum query logging&#10;&lt;/h2&gt;&#10;&lt;p&gt;To include query text and duration, enable duration-based statement logging:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-03eeee76-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="postgresql" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-03eeee76-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-postgresql" data-lang="postgresql"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;log_min_duration_statement&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&lt;code&gt;0&lt;/code&gt; logs every completed statement. On a busy server, choose a higher threshold in milliseconds to control log volume. Measure the overhead and storage growth before enabling a low threshold in production.&lt;/p&gt;</description></item><item><title>Parallel Processing</title><link>https://pig.center/docs/pgbadger/parallel-processing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/pgbadger/parallel-processing/</guid><description>&lt;p&gt;pgBadger has two complementary multiprocessing modes. Choose according to the shape of the input, not simply the number of CPUs.&lt;/p&gt;&#10;&lt;div class="td-table-scroll td-table-scroll--static"&gt;&#10;&lt;table&gt;&#10; &lt;thead&gt;&#10; &lt;tr&gt;&#10; &lt;th scope="col"&gt;Option&lt;/th&gt;&#10; &lt;th scope="col"&gt;Parallel unit&lt;/th&gt;&#10; &lt;th scope="col"&gt;Best fit&lt;/th&gt;&#10; &lt;th scope="col"&gt;Main constraint&lt;/th&gt;&#10; &lt;/tr&gt;&#10; &lt;/thead&gt;&#10; &lt;tbody&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;&lt;code&gt;-j N&lt;/code&gt; / &lt;code&gt;--jobs N&lt;/code&gt;&lt;/td&gt;&#10; &lt;td&gt;chunks of one log file&lt;/td&gt;&#10; &lt;td&gt;one large, seekable log&lt;/td&gt;&#10; &lt;td&gt;chunk boundaries can duplicate or omit a small number of queries&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;&lt;code&gt;-J N&lt;/code&gt; / &lt;code&gt;--Jobs N&lt;/code&gt;&lt;/td&gt;&#10; &lt;td&gt;whole log files&lt;/td&gt;&#10; &lt;td&gt;many independent logs&lt;/td&gt;&#10; &lt;td&gt;useful only when enough files are available to keep workers busy&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;h2 id="single-file-jobs"&gt;Split one large file with &lt;code&gt;-j&lt;/code&gt;&#10;&lt;/h2&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-e117b40b-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="console" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-e117b40b-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; pgbadger -j &lt;span class="m"&gt;8&lt;/span&gt; /var/log/postgresql/postgresql.log&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;The upstream algorithm divides each file into &lt;code&gt;N&lt;/code&gt; byte ranges, forks one parser per range, writes temporary binary statistics, then merges those statistics into the final report.&lt;/p&gt;</description></item><item><title>Incremental Reports</title><link>https://pig.center/docs/pgbadger/incremental-reports/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/pgbadger/incremental-reports/</guid><description>&lt;p&gt;Incremental mode stores parsed statistics in binary form, then builds one HTML report per day, a cumulative report per week, and a calendar-style index linking them together. It is intended for repeated processing of rotated logs without counting the same entries again.&lt;/p&gt;&#10;&lt;h2 id="daily-and-weekly"&gt;Build daily and weekly reports&#10;&lt;/h2&gt;&#10;&lt;p&gt;Run pgBadger after the daily log rotation and provide a persistent output directory:&lt;/p&gt;&#10;&lt;div class="td-code td-code--titled" id="td-code-187415c9-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="cron" data-td-line-count="1" role="group" aria-labelledby="td-code-187415c9-fence-0-title"&gt;&#10; &lt;div class="td-code__header"&gt;&#10; &lt;span class="td-code__filename" id="td-code-187415c9-fence-0-title" title="crontab"&gt;crontab&lt;/span&gt;&#10; &lt;/div&gt;&#10; &lt;div class="td-code__viewport" id="td-code-187415c9-fence-0-viewport" data-td-code-viewport&gt;&lt;pre tabindex="0"&gt;&lt;code class="language-cron" data-lang="cron"&gt;0 4 * * * /usr/bin/pgbadger -I -q /var/log/postgresql/postgresql.log.1 -O /var/www/pg_reports/&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&lt;code&gt;-I&lt;/code&gt; enables incremental mode and &lt;code&gt;-O&lt;/code&gt; selects the directory that holds the binary state, calendar index, and generated reports. pgBadger maintains its own incremental state in that directory, so &lt;code&gt;--last-parsed&lt;/code&gt; is unnecessary unless you deliberately want the state file elsewhere.&lt;/p&gt;</description></item><item><title>Replica imaging and bootstrap</title><link>https://pig.center/docs/patroni/replica_bootstrap/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/replica_bootstrap/</guid><description>&lt;p&gt;&lt;a id="replica_imaging_and_bootstrap"&gt;&lt;/a&gt;&#10;Patroni allows customizing creation of a new replica. It also supports defining what happens when the new empty cluster is being bootstrapped. The distinction between two is well defined: Patroni creates replicas only if the &lt;code&gt;initialize&lt;/code&gt; key is present in DCS for the cluster. If there is no &lt;code&gt;initialize&lt;/code&gt; key - Patroni calls bootstrap exclusively on the first node that takes the initialize key lock.&lt;/p&gt;&#10;&lt;p&gt;&lt;a id="custom_bootstrap"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="bootstrap"&gt;Bootstrap&#10;&lt;/h2&gt;&#10;&lt;p&gt;PostgreSQL provides &lt;code&gt;initdb&lt;/code&gt; command to initialize a new cluster and Patroni calls it by default. In certain cases, particularly when creating a new cluster as a copy of an existing one, it is necessary to replace a built-in method with custom actions. Patroni supports executing user-defined scripts to bootstrap new clusters, supplying some required arguments to them, i.e. the name of the cluster and the path to the data directory. This is configured in the &lt;code&gt;bootstrap&lt;/code&gt; section of the Patroni configuration. For example:&lt;/p&gt;</description></item><item><title>Releases, Packages, and Upgrades</title><link>https://pig.center/docs/haproxy/releases-and-upgrades/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/releases-and-upgrades/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;HAProxy is an open source project covered by the GPLv2 license, meaning that everyone is allowed to&#10;redistribute it provided that access to the sources is also provided upon request, especially if any&#10;modifications were made.&lt;/p&gt;&#10;&lt;p&gt;HAProxy evolves as a main development branch called &amp;ldquo;master&amp;rdquo; or &amp;ldquo;mainline&amp;rdquo;, from which new branches&#10;are derived once the code is considered stable. A lot of web sites run some development branches in&#10;production on a voluntarily basis, either to participate to the project or because they need a&#10;bleeding edge feature, and their feedback is highly valuable to fix bugs and judge the overall&#10;quality and stability of the version being developed.&lt;/p&gt;</description></item><item><title>Standby cluster</title><link>https://pig.center/docs/patroni/standby_cluster/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/standby_cluster/</guid><description>&lt;p&gt;&lt;a id="standby_cluster"&gt;&lt;/a&gt;&#10;Patroni also support running cascading replication to a remote datacenter (region) using a feature that is called &amp;ldquo;standby cluster&amp;rdquo;. This type of clusters has:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&amp;ldquo;standby leader&amp;rdquo;, that behaves pretty much like a regular cluster leader, except it replicates from a remote node.&lt;/li&gt;&#10;&lt;li&gt;cascade replicas, that are replicating from standby leader.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Standby leader holds and updates a leader lock in DCS. If the leader lock expires, cascade replicas will perform an election to choose another leader from the standbys.&lt;/p&gt;</description></item><item><title>Tasks</title><link>https://pig.center/docs/etcd/tasks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/</guid><description/></item><item><title>Operator Tasks</title><link>https://pig.center/docs/etcd/tasks/operator/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/operator/</guid><description/></item><item><title>How to Set Up a Demo etcd Cluster</title><link>https://pig.center/docs/etcd/tasks/operator/how-to-setup-cluster/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/operator/how-to-setup-cluster/</guid><description>&lt;img class="td-image" src="https://pig.center/docs/etcd/tasks/img/setup-cluster.gif" alt="01_etcd_clustering_2016050601" loading="lazy" decoding="async"&gt;&lt;p&gt;On each etcd node, specify the cluster members:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-37cfaa9d-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="shell" data-td-line-count="9"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-37cfaa9d-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;token-01&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;CLUSTER_STATE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;new&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;NAME_1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;machine-1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;NAME_2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;machine-2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;NAME_3&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;machine-3&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;HOST_1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10.240.0.17&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;HOST_2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10.240.0.18&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;HOST_3&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10.240.0.19&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;CLUSTER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NAME_1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOST_1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380,&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NAME_2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOST_2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380,&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NAME_3&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOST_3&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;Run this on each machine:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-37cfaa9d-fence-1" data-td-code data-td-code-auto-id&#10; data-td-language="shell" data-td-line-count="26"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-37cfaa9d-fence-1-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# For machine 1&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;THIS_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NAME_1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOST_1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcd --data-dir&lt;span class="o"&gt;=&lt;/span&gt;data.etcd --name &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_NAME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-advertise-peer-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380 --listen-peer-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--advertise-client-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2379 --listen-client-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2379 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-cluster &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CLUSTER&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-cluster-state &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CLUSTER_STATE&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; --initial-cluster-token &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;TOKEN&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# For machine 2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;THIS_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NAME_2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOST_2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcd --data-dir&lt;span class="o"&gt;=&lt;/span&gt;data.etcd --name &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_NAME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-advertise-peer-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380 --listen-peer-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--advertise-client-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2379 --listen-client-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2379 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-cluster &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CLUSTER&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-cluster-state &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CLUSTER_STATE&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; --initial-cluster-token &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;TOKEN&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# For machine 3&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;THIS_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NAME_3&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOST_3&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcd --data-dir&lt;span class="o"&gt;=&lt;/span&gt;data.etcd --name &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_NAME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-advertise-peer-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380 --listen-peer-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--advertise-client-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2379 --listen-client-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2379 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-cluster &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CLUSTER&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-cluster-state &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CLUSTER_STATE&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; --initial-cluster-token &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;TOKEN&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;Or use our public discovery service:&lt;/p&gt;</description></item><item><title>Pause/Resume mode for the cluster</title><link>https://pig.center/docs/patroni/pause/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/pause/</guid><description>&lt;p&gt;&lt;a id="pause"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="the-goal"&gt;The goal&#10;&lt;/h2&gt;&#10;&lt;p&gt;Under certain circumstances Patroni needs to temporarily step down from managing the cluster, while still retaining the cluster state in DCS. Possible use cases are uncommon activities on the cluster, such as major version upgrades or corruption recovery. During those activities nodes are often started and stopped for reasons unknown to Patroni, some nodes can be even temporarily promoted, violating the assumption of running only one primary. Therefore, Patroni needs to be able to &amp;ldquo;detach&amp;rdquo; from the running cluster, implementing an equivalent of the maintenance mode in Pacemaker.&lt;/p&gt;</description></item><item><title>Support and Contributing</title><link>https://pig.center/docs/pgbadger/support/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/pgbadger/support/</guid><description>&lt;p&gt;pgBadger is maintained as an open project. Bug reports, feature proposals, documentation fixes, and patches are handled through the upstream GitHub repository.&lt;/p&gt;&#10;&lt;h2 id="bugs-and-features"&gt;Bugs and feature requests&#10;&lt;/h2&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Upgrade to the newest released version and confirm the behavior still occurs.&lt;/li&gt;&#10;&lt;li&gt;Search &lt;a href="https://github.com/darold/pgbadger/issues"&gt;open issues&lt;/a&gt;&#10; and &lt;a href="https://github.com/darold/pgbadger/issues?q=is%3Aissue&amp;#43;is%3Aclosed"&gt;closed issues&lt;/a&gt;&#10; for an existing answer.&lt;/li&gt;&#10;&lt;li&gt;Reduce the problem to the smallest safe log sample and command line that still reproduces it.&lt;/li&gt;&#10;&lt;li&gt;Remove credentials, sensitive SQL, bind values, host names, addresses, and business data.&lt;/li&gt;&#10;&lt;li&gt;Open a &lt;a href="https://github.com/darold/pgbadger/issues/new"&gt;new issue&lt;/a&gt;&#10; with the pgBadger version, operating system, input format, exact options, observed result, and expected result.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;For crashes or parser mistakes, include only the minimum sanitized log lines needed to reproduce the boundary. A complete production log or generated report is rarely appropriate for a public issue.&lt;/p&gt;</description></item><item><title>Using Patroni with Kubernetes</title><link>https://pig.center/docs/patroni/kubernetes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/kubernetes/</guid><description>&lt;p&gt;&lt;a id="kubernetes"&gt;&lt;/a&gt;&#10;Patroni can use Kubernetes objects in order to store the state of the cluster and manage the leader key. That makes it capable of operating Postgres in Kubernetes environment without any consistency store, namely, one doesn&amp;rsquo;t need to run an extra Etcd deployment. There are two different type of Kubernetes objects Patroni can use to store the leader and the configuration keys, they are configured with the &lt;code&gt;kubernetes.use_endpoints&lt;/code&gt; or &lt;code&gt;PATRONI_KUBERNETES_USE_ENDPOINTS&lt;/code&gt; environment variable.&lt;/p&gt;</description></item><item><title>Convert a Standalone to a Patroni Cluster</title><link>https://pig.center/docs/patroni/existing_data/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/existing_data/</guid><description>&lt;p&gt;&lt;a id="existing_data"&gt;&lt;/a&gt;&#10;This section describes the process for converting a standalone PostgreSQL instance into a Patroni cluster.&lt;/p&gt;&#10;&lt;p&gt;To deploy a Patroni cluster without using a pre-existing PostgreSQL instance, see &lt;a href="https://pig.center/docs/patroni/readme/#running_configuring"&gt;Running and Configuring&lt;/a&gt;&#10; instead.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="procedure"&gt;Procedure&#10;&lt;/h2&gt;&#10;&lt;p&gt;You can find below an overview of steps for converting an existing Postgres cluster to a Patroni managed cluster. In the steps we assume all nodes that are part of the existing cluster are currently up and running, and that you &lt;em&gt;do not&lt;/em&gt; intend to change Postgres configuration while the migration is ongoing. The steps:&lt;/p&gt;</description></item><item><title>Developer Tasks</title><link>https://pig.center/docs/etcd/tasks/developer/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/developer/</guid><description/></item><item><title>8. Logging</title><link>https://pig.center/docs/haproxy/configuration-logging/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/configuration-logging/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;One of HAProxy&amp;rsquo;s strong points certainly lies is its precise logs. It probably provides the finest&#10;level of information available for such a product, which is very important for troubleshooting&#10;complex environments. Standard information provided in logs include client ports, TCP/HTTP state&#10;timers, precise stream state at termination and precise termination cause, information about&#10;decisions to direct traffic to a server, and of course the ability to capture arbitrary headers.&lt;/p&gt;</description></item><item><title>Contributing guidelines</title><link>https://pig.center/docs/patroni/contributing_guidelines/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/contributing_guidelines/</guid><description>&lt;p&gt;&lt;a id="contributing_guidelines"&gt;&lt;/a&gt;&#10;&lt;a id="chatting"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="chatting"&gt;Chatting&#10;&lt;/h2&gt;&#10;&lt;p&gt;If you have a question, looking for an interactive troubleshooting help or want to chat with other Patroni users, join us on channel &lt;a href="https://postgresteam.slack.com/archives/C9XPYG92A"&gt;#patroni&lt;/a&gt;&#10; in the &lt;a href="https://pgtreats.info/slack-invite"&gt;PostgreSQL Slack&lt;/a&gt;&#10;.&lt;/p&gt;&#10;&lt;p&gt;&lt;a id="reporting_bugs"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="reporting-bugs"&gt;Reporting bugs&#10;&lt;/h2&gt;&#10;&lt;p&gt;Before reporting a bug please make sure to &lt;strong&gt;reproduce it with the latest Patroni version&lt;/strong&gt;! Also please double check if the issue already exists in our &lt;a href="https://github.com/patroni/patroni/issues"&gt;Issues Tracker&lt;/a&gt;&#10;.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="running-tests"&gt;Running tests&#10;&lt;/h2&gt;&#10;&lt;p&gt;Requirements for running behave tests:&lt;/p&gt;</description></item><item><title>Reading from etcd</title><link>https://pig.center/docs/etcd/tasks/developer/reading-from-etcd/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/developer/reading-from-etcd/</guid><description>&lt;h2 id="prerequisites"&gt;Prerequisites&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Install &lt;code&gt;etcdctl&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="procedure"&gt;Procedure&#10;&lt;/h2&gt;&#10;&lt;p&gt;Use the &lt;code&gt;get&lt;/code&gt; subcommand to read from etcd:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-7e78448b-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="shell" data-td-line-count="4"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-7e78448b-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; get foo&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;foo&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Hello World!&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;where:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;foo&lt;/code&gt; is the requested key&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;Hello World!&lt;/code&gt; is the retrieved value&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Or, for formatted output:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-7e78448b-fence-1" data-td-code data-td-code-auto-id&#10; data-td-language="" data-td-line-count="4"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-7e78448b-fence-1-viewport" data-td-code-viewport&gt;&lt;pre tabindex="0"&gt;&lt;code&gt;$ etcdctl --endpoints=$ENDPOINTS --write-out=&amp;#34;json&amp;#34; get foo&#10;{&amp;#34;header&amp;#34;:{&amp;#34;cluster_id&amp;#34;:289318470931837780,&amp;#34;member_id&amp;#34;:14947050114012957595,&amp;#34;revision&amp;#34;:3,&amp;#34;raft_term&amp;#34;:4,&#10;&amp;#34;kvs&amp;#34;:[{&amp;#34;key&amp;#34;:&amp;#34;Zm9v&amp;#34;,&amp;#34;create_revision&amp;#34;:2,&amp;#34;mod_revision&amp;#34;:3,&amp;#34;version&amp;#34;:2,&amp;#34;value&amp;#34;:&amp;#34;SGVsbG8gV29ybGQh&amp;#34;}]}}&#10;$&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;where &lt;code&gt;write-out=&amp;quot;json&amp;quot;&lt;/code&gt; causes the value to be output in JSON format (note that the key is not returned).&lt;/p&gt;</description></item><item><title>1. Prerequisites</title><link>https://pig.center/docs/haproxy/prerequisites/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/prerequisites/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;This document describes how to start, stop, manage, and troubleshoot HAProxy, as well as some known&#10;limitations and traps to avoid. It does not describe how to configure it (for this please read&#10;&lt;a href="https://pig.center/docs/haproxy/http-fundamentals/"&gt;&lt;code&gt;configuration.txt&lt;/code&gt;&lt;/a&gt;&#10;).&lt;/p&gt;&#10;&lt;p&gt;In this document it is assumed that the reader has sufficient administration skills on a UNIX-like&#10;operating system, uses the shell on a daily basis and is familiar with troubleshooting utilities&#10;such as strace and tcpdump.&lt;/p&gt;</description></item><item><title>Writing to etcd</title><link>https://pig.center/docs/etcd/tasks/developer/writing-to-etcd/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/developer/writing-to-etcd/</guid><description>&lt;h2 id="prerequisites"&gt;Prerequisites&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Install &lt;code&gt;etcdctl&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="procedure"&gt;Procedure&#10;&lt;/h2&gt;&#10;&lt;p&gt;Use the &lt;code&gt;put&lt;/code&gt; subcommand to write a key-value pair:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-ce3acf5f-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="shell" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-ce3acf5f-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; put foo &lt;span class="s2"&gt;&amp;#34;Hello World!&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;where:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;foo&lt;/code&gt; is the key name&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;&amp;quot;Hello World!&amp;quot;&lt;/code&gt; is the quote-delimited value&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>3. Starting HAProxy</title><link>https://pig.center/docs/haproxy/starting/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/starting/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;HAProxy is started by invoking the &amp;ldquo;haproxy&amp;rdquo; program with a number of arguments passed on the&#10;command line. The actual syntax is:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-cc693269-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="shell" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-cc693269-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ haproxy &lt;span class="o"&gt;[&lt;/span&gt;&amp;lt;options&amp;gt;&lt;span class="o"&gt;]&lt;/span&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;where [&lt;code&gt;&amp;lt;options&amp;gt;&lt;/code&gt;]* is any number of options. An option always starts with &amp;lsquo;-&amp;rsquo; followed by one&#10;of more letters, and possibly followed by one or multiple extra arguments. Without any option,&#10;HAProxy displays the help page with a reminder about supported options. Available options may vary&#10;slightly based on the operating system. A fair number of these options overlap with an equivalent&#10;one in the &amp;ldquo;global&amp;rdquo; section. In this case, the command line always has precedence over the&#10;configuration file, so that the command line can be used to quickly enforce some settings without&#10;touching the configuration files. The current list of options is:&lt;/p&gt;</description></item><item><title>4. Stopping and Restarting HAProxy</title><link>https://pig.center/docs/haproxy/stopping-and-restarting/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/stopping-and-restarting/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;HAProxy supports a graceful and a hard stop. The hard stop is simple, when the SIGTERM signal is&#10;sent to the haproxy process, it immediately quits and all established connections are closed. The&#10;graceful stop is triggered when the SIGUSR1 signal is sent to the haproxy process. It consists in&#10;only unbinding from listening ports, but continue to process existing connections until they close.&#10;Once the last connection is closed, the process leaves.&lt;/p&gt;</description></item><item><title>5. File-Descriptor Limitations</title><link>https://pig.center/docs/haproxy/file-descriptors/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/file-descriptors/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;In order to ensure that all incoming connections will successfully be served, HAProxy computes at&#10;load time the total number of file descriptors that will be needed during the process&amp;rsquo;s life. A&#10;regular Unix process is generally granted 1024 file descriptors by default, and a privileged process&#10;can raise this limit itself. This is one reason for starting HAProxy as root and letting it adjust&#10;the limit. The default limit of 1024 file descriptors roughly allow about 500 concurrent connections&#10;to be processed. The computation is based on the global maxconn parameter which limits the total&#10;number of connections per process, the number of listeners, the number of servers which have a&#10;health check enabled, the agent checks, the peers, the loggers and possibly a few other technical&#10;requirements. A simple rough estimate of this number consists in simply doubling the maxconn value&#10;and adding a few tens to get the approximate number of file descriptors needed.&lt;/p&gt;</description></item><item><title>6. Memory Management</title><link>https://pig.center/docs/haproxy/memory/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/memory/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;HAProxy uses a simple and fast pool-based memory management. Since it relies on a small number of&#10;different object types, it&amp;rsquo;s much more efficient to pick new objects from a pool which already&#10;contains objects of the appropriate size than to call malloc() for each different size. The pools&#10;are organized as a stack or LIFO, so that newly allocated objects are taken from recently released&#10;objects still hot in the CPU caches. Pools of similar sizes are merged together, in order to limit&#10;memory fragmentation.&lt;/p&gt;</description></item><item><title>How to get keys by prefix</title><link>https://pig.center/docs/etcd/tasks/developer/how-to-get-key-by-prefix/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/developer/how-to-get-key-by-prefix/</guid><description>&lt;h2 id="pre-requisites"&gt;Pre-requisites&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/install/"&gt;Install etcdctl&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/dev-guide/local_cluster/"&gt;Setup a local cluster&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="get-keys-by-prefix"&gt;Get keys by prefix&#10;&lt;/h2&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-f7791afa-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-f7791afa-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; get PREFIX --prefix&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h3 id="global-options"&gt;Global Options&#10;&lt;/h3&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-f7791afa-fence-1" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-f7791afa-fence-1-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--endpoints&lt;span class="o"&gt;=[&lt;/span&gt;127.0.0.1:2379&lt;span class="o"&gt;]&lt;/span&gt;, gRPC endpoints&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h3 id="options"&gt;Options&#10;&lt;/h3&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-f7791afa-fence-2" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-f7791afa-fence-2-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--prefix, get a range of keys with matching prefix&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h3 id="example"&gt;Example&#10;&lt;/h3&gt;&#10;&lt;img class="td-image" src="https://pig.center/docs/etcd/tasks/img/get-by-prefix.gif" alt="03_etcdctl_get_by_prefix_2016050501" loading="lazy" decoding="async"&gt;&lt;div class="td-code td-code--untitled" id="td-code-f7791afa-fence-3" data-td-code data-td-code-auto-id&#10; data-td-language="shell" data-td-line-count="5"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-f7791afa-fence-3-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; put web1 value1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; put web2 value2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; put web3 value3&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; get web --prefix&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;</description></item><item><title>7. CPU Usage</title><link>https://pig.center/docs/haproxy/cpu/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/cpu/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;HAProxy normally spends most of its time in the system and a smaller part in userland. A finely&#10;tuned 3.5 GHz CPU can sustain a rate about 80000 end-to-end connection setups and closes per second&#10;at 100% CPU on a single core. When one core is saturated, typical figures are:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;95% system, 5% user for long TCP connections or large HTTP objects&lt;/li&gt;&#10;&lt;li&gt;85% system and 15% user for short TCP connections or small HTTP objects in close mode&lt;/li&gt;&#10;&lt;li&gt;70% system and 30% user for small HTTP objects in keep-alive mode&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;The amount of rules processing and regular expressions will increase the user land part. The&#10;presence of firewall rules, connection tracking, complex routing tables in the system will instead&#10;increase the system part.&lt;/p&gt;</description></item><item><title>8. Logging</title><link>https://pig.center/docs/haproxy/management-logging/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/management-logging/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;For logging, HAProxy always relies on a syslog server since it does not perform any file-system&#10;access. The standard way of using it is to send logs over UDP to the log server (by default on port&#10;514). Very commonly this is configured to 127.0.0.1 where the local syslog daemon is running, but&#10;it&amp;rsquo;s also used over the network to log to a central server. The central server provides additional&#10;benefits especially in active-active scenarios where it is desirable to keep the logs merged in&#10;arrival order. HAProxy may also make use of a UNIX socket to send its logs to the local syslog&#10;daemon, but it is not recommended at all, because if the syslog server is restarted while haproxy&#10;runs, the socket will be replaced and new logs will be lost. Since HAProxy will be isolated inside a&#10;chroot jail, it will not have the ability to reconnect to the new socket. It has also been observed&#10;in field that the log buffers in use on UNIX sockets are very small and lead to lost messages even&#10;at very light loads. But this can be fine for testing however.&lt;/p&gt;</description></item><item><title>9. Statistics and Monitoring</title><link>https://pig.center/docs/haproxy/statistics-and-monitoring/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/statistics-and-monitoring/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;It is possible to query HAProxy about its status. The most commonly used mechanism is the HTTP&#10;statistics page. This page also exposes an alternative CSV output format for monitoring tools. The&#10;same format is provided on the Unix socket.&lt;/p&gt;&#10;&lt;p&gt;Statistics are regroup in categories labelled as domains, corresponding to the multiple components&#10;of HAProxy. There are two domains available: proxy and resolvers. If not specified, the proxy domain&#10;is selected. Note that only the proxy statistics are printed on the HTTP page.&lt;/p&gt;</description></item><item><title>10. Easier Configuration Management</title><link>https://pig.center/docs/haproxy/configuration-management/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/configuration-management/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;It is very common that two HAProxy nodes constituting a cluster share exactly the same configuration&#10;modulo a few addresses. Instead of having to maintain a duplicate configuration for each node, which&#10;will inevitably diverge, it is possible to include environment variables in the configuration. Thus&#10;multiple configuration may share the exact same file with only a few different system wide&#10;environment variables. This started in version 1.5 where only addresses were allowed to include&#10;environment variables, and 1.6 goes further by supporting environment variables everywhere. The&#10;syntax is the same as in the UNIX shell, a variable starts with a dollar sign (&amp;rsquo;$&amp;rsquo;), followed by an&#10;opening curly brace (&amp;rsquo;{&amp;rsquo;), then the variable name followed by the closing brace (&amp;rsquo;}&amp;rsquo;). Except for&#10;addresses, environment variables are only interpreted in arguments surrounded with double quotes&#10;(this was necessary not to break existing setups using regular expressions involving the dollar&#10;symbol).&lt;/p&gt;</description></item><item><title>11. Well-Known Traps to Avoid</title><link>https://pig.center/docs/haproxy/traps/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/traps/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;Once in a while, someone reports that after a system reboot, the haproxy service wasn&amp;rsquo;t started, and&#10;that once they start it by hand it works. Most often, these people are running a clustered IP&#10;address mechanism such as keepalived, to assign the service IP address to the master node only, and&#10;while it used to work when they used to bind haproxy to address 0.0.0.0, it stopped working after&#10;they bound it to the virtual IP address. What happens here is that when the service starts, the&#10;virtual IP address is not yet owned by the local node, so when HAProxy wants to bind to it, the&#10;system rejects this because it is not a local IP address. The fix doesn&amp;rsquo;t consist in delaying the&#10;haproxy service startup (since it wouldn&amp;rsquo;t stand a restart), but instead to properly configure the&#10;system to allow binding to non-local addresses. This is easily done on Linux by setting the&#10;net.ipv4.ip_nonlocal_bind sysctl to 1. This is also needed in order to transparently intercept the&#10;IP traffic that passes through HAProxy for a specific target address.&lt;/p&gt;</description></item><item><title>12. Debugging and Performance Issues</title><link>https://pig.center/docs/haproxy/debugging-and-performance/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/debugging-and-performance/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;When HAProxy is started with the &amp;ldquo;-d&amp;rdquo; option, it will stay in the foreground and will print one line&#10;per event, such as an incoming connection, the end of a connection, and for each request or response&#10;header line seen. This debug output is emitted before the contents are processed, so they don&amp;rsquo;t&#10;consider the local modifications. The main use is to show the request and response without having to&#10;run a network sniffer. The output is less readable when multiple connections are handled in&#10;parallel, though the &amp;ldquo;debug2ansi&amp;rdquo; and &amp;ldquo;debug2html&amp;rdquo; scripts found in the examples/ directory&#10;definitely help here by coloring the output.&lt;/p&gt;</description></item><item><title>13. Security Considerations</title><link>https://pig.center/docs/haproxy/security/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/security/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;HAProxy is designed to run with very limited privileges. The standard way to use it is to isolate it&#10;into a chroot jail and to drop its privileges to a non-root user without any permissions inside this&#10;jail so that if any future vulnerability were to be discovered, its compromise would not affect the&#10;rest of the system.&lt;/p&gt;&#10;&lt;p&gt;In order to perform a chroot, it first needs to be started as a root user. It is pointless to build&#10;hand-made chroots to start the process there, these ones are painful to build, are never properly&#10;maintained and always contain way more bugs than the main file-system. And in case of compromise,&#10;the intruder can use the purposely built file-system. Unfortunately many administrators confuse&#10;&amp;ldquo;start as root&amp;rdquo; and &amp;ldquo;run as root&amp;rdquo;, resulting in the uid change to be done prior to starting haproxy,&#10;and reducing the effective security restrictions.&lt;/p&gt;</description></item><item><title>How to delete keys</title><link>https://pig.center/docs/etcd/tasks/developer/how-to-delete-keys/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/developer/how-to-delete-keys/</guid><description>&lt;h2 id="prerequisites"&gt;Prerequisites&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Install &lt;a href="https://pig.center/docs/etcd/install/"&gt;&lt;code&gt;etcd&lt;/code&gt; and &lt;code&gt;etcdctl&lt;/code&gt;&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="add-or-delete-keys"&gt;Add or delete keys&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;del&lt;/code&gt; to remove the specified key or range of keys:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-7773e648-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-7773e648-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl del &lt;span class="nv"&gt;$KEY&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;$END_KEY&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h3 id="options"&gt;Options&#10;&lt;/h3&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-7773e648-fence-1" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="4"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-7773e648-fence-1-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--prefix&lt;span class="o"&gt;[=&lt;/span&gt;false&lt;span class="o"&gt;]&lt;/span&gt;: delete keys with matching prefix&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--prev-kv&lt;span class="o"&gt;[=&lt;/span&gt;false&lt;span class="o"&gt;]&lt;/span&gt;: &lt;span class="k"&gt;return&lt;/span&gt; deleted key-value pairs&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--from-key&lt;span class="o"&gt;[=&lt;/span&gt;false&lt;span class="o"&gt;]&lt;/span&gt;: delete keys that are greater than or equal to the given key using byte compare&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--range&lt;span class="o"&gt;[=&lt;/span&gt;false&lt;span class="o"&gt;]&lt;/span&gt;: delete range of keys without delay&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h3 id="options-inherited-from-parent-commands"&gt;Options inherited from parent commands&#10;&lt;/h3&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-7773e648-fence-2" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-7773e648-fence-2-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;127.0.0.1:2379&amp;#34;&lt;/span&gt;: gRPC endpoints&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h3 id="examples"&gt;Examples&#10;&lt;/h3&gt;&#10;&lt;img class="td-image" src="https://pig.center/docs/etcd/tasks/img/delete-keys.gif" alt="04_etcdctl_delete_2016050601" loading="lazy" decoding="async"&gt;&lt;div class="td-code td-code--untitled" id="td-code-7773e648-fence-3" data-td-code data-td-code-auto-id&#10; data-td-language="shell" data-td-line-count="6"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-7773e648-fence-3-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; put key myvalue&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; del key&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; put k1 value1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; put k2 value2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; del k --prefix&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;</description></item><item><title>How to make multiple writes in a transaction</title><link>https://pig.center/docs/etcd/tasks/developer/how-to-transactional-write/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/developer/how-to-transactional-write/</guid><description>&lt;h2 id="prerequisites"&gt;Prerequisites&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Install &lt;a href="https://pig.center/docs/etcd/install/"&gt;&lt;code&gt;etcd&lt;/code&gt; and &lt;code&gt;etcdctl&lt;/code&gt;&lt;/a&gt;&#10;.&lt;/li&gt;&#10;&lt;li&gt;A running &lt;code&gt;etcd&lt;/code&gt; cluster.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="terminology"&gt;Terminology&#10;&lt;/h2&gt;&#10;&lt;p&gt;Here are definitions of some key terms used in the &lt;a href="#example"&gt;Example&lt;/a&gt;&#10; below.&lt;/p&gt;&#10;&lt;div class="td-table-scroll td-table-scroll--static"&gt;&#10;&lt;table&gt;&#10; &lt;thead&gt;&#10; &lt;tr&gt;&#10; &lt;th scope="col"&gt;Terms&lt;/th&gt;&#10; &lt;th scope="col"&gt;Definition&lt;/th&gt;&#10; &lt;/tr&gt;&#10; &lt;/thead&gt;&#10; &lt;tbody&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;&lt;a href="https://github.com/etcd-io/etcd/blob/main/etcdctl/README.md#etcdctl"&gt;etcdctl&lt;/a&gt;&#10;&lt;/td&gt;&#10; &lt;td&gt;The command line tool for interacting with the etcd server.&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;&lt;a href="https://github.com/etcd-io/etcd/blob/main/etcdctl/README.md#txn-options"&gt;&lt;code&gt;txn&lt;/code&gt;&lt;/a&gt;&#10; command&lt;/td&gt;&#10; &lt;td&gt;&lt;code&gt;txn&lt;/code&gt; command is an abbreviation for &amp;ldquo;transaction&amp;rdquo;. It reads multiple etcd requests from standard input and applies them as a single atomic transaction. A transaction consists of list of conditions, a list of requests to apply if all the conditions are true, and a list of requests to apply if any condition is false. View &lt;a href="https://github.com/etcd-io/etcd/blob/main/etcdctl/README.md#key-value-commands"&gt;etcdctl key-value commands&lt;/a&gt;&#10; for more information.&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;&lt;code&gt;compare&lt;/code&gt;&lt;/td&gt;&#10; &lt;td&gt;The &lt;code&gt;compare&lt;/code&gt; clause within a transaction (&lt;code&gt;txn&lt;/code&gt;) serves as a conditional check that determines whether the transaction&amp;rsquo;s operations should proceed. It ensures changes are only applied if the current state of the key-value store matches expected conditions, thereby maintaining data consistency and preventing conflicts in concurrent environments. To see how the command is structured, view &lt;a href="#2-perform-a-transaction"&gt;Perform a transaction&lt;/a&gt;&#10; section below.&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;h2 id="transactions"&gt;Transactions&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;txn&lt;/code&gt; to process all the requests in one transaction:&lt;/p&gt;</description></item><item><title>How to watch keys</title><link>https://pig.center/docs/etcd/tasks/developer/how-to-watch-keys/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/developer/how-to-watch-keys/</guid><description>&lt;h2 id="prerequisites"&gt;Prerequisites&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Install &lt;a href="https://pig.center/docs/etcd/install/"&gt;&lt;code&gt;etcd&lt;/code&gt; and &lt;code&gt;etcdctl&lt;/code&gt;&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="watching-keys"&gt;Watching keys&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;watch&lt;/code&gt; to get notified of future changes:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-e55208fa-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-e55208fa-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl watch &lt;span class="nv"&gt;$KEY&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;$END_KEY&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h3 id="options"&gt;Options&#10;&lt;/h3&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-e55208fa-fence-1" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="5"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-e55208fa-fence-1-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;-i, --interactive&lt;span class="o"&gt;[=&lt;/span&gt;false&lt;span class="o"&gt;]&lt;/span&gt;: interactive mode&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--prefix&lt;span class="o"&gt;[=&lt;/span&gt;false&lt;span class="o"&gt;]&lt;/span&gt;: watch on a prefix &lt;span class="k"&gt;if&lt;/span&gt; prefix is &lt;span class="nb"&gt;set&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--rev&lt;span class="o"&gt;=&lt;/span&gt;0: Revision to start watching&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--prev-kv&lt;span class="o"&gt;[=&lt;/span&gt;false&lt;span class="o"&gt;]&lt;/span&gt;: get the previous key-value pair before the event happens&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--progress-notify&lt;span class="o"&gt;[=&lt;/span&gt;false&lt;span class="o"&gt;]&lt;/span&gt;: get periodic watch progress notification from server&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h3 id="options-inherited-from-parent-commands"&gt;Options inherited from parent commands&#10;&lt;/h3&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-e55208fa-fence-2" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-e55208fa-fence-2-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;127.0.0.1:2379&amp;#34;&lt;/span&gt;: gRPC endpoints&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h3 id="examples"&gt;Examples&#10;&lt;/h3&gt;&#10;&lt;img class="td-image" src="https://pig.center/docs/etcd/tasks/img/watch-keys.gif" alt="06_etcdctl_watch_2016050501" loading="lazy" decoding="async"&gt;&lt;div class="td-code td-code--untitled" id="td-code-e55208fa-fence-3" data-td-code data-td-code-auto-id&#10; data-td-language="shell" data-td-line-count="6"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-e55208fa-fence-3-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; watch stock1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; put stock1 &lt;span class="m"&gt;1000&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; watch stock --prefix&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; put stock1 &lt;span class="m"&gt;10&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; put stock2 &lt;span class="m"&gt;20&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;</description></item><item><title>How to create lease</title><link>https://pig.center/docs/etcd/tasks/developer/how-to-create-lease/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/developer/how-to-create-lease/</guid><description>&lt;p&gt;&lt;code&gt;lease&lt;/code&gt; to write with TTL:&lt;/p&gt;&#10;&lt;img class="td-image" src="https://pig.center/docs/etcd/tasks/img/create-lease.gif" alt="07_etcdctl_lease_2016050501" loading="lazy" decoding="async"&gt;&lt;div class="td-code td-code--untitled" id="td-code-8b152f6e-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="shell" data-td-line-count="10"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-8b152f6e-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; lease grant &lt;span class="m"&gt;300&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# lease 2be7547fbc6a5afa granted with TTL(300s)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; put sample value --lease&lt;span class="o"&gt;=&lt;/span&gt;2be7547fbc6a5afa&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; get sample&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; lease keep-alive 2be7547fbc6a5afa&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; lease revoke 2be7547fbc6a5afa&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# or after 300 seconds&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; get sample&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;</description></item><item><title>How to create locks</title><link>https://pig.center/docs/etcd/tasks/developer/how-to-create-locks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/developer/how-to-create-locks/</guid><description>&lt;p&gt;LOCK acquires a distributed mutex with a given name. Once the lock is acquired, it will be held until etcdctl is terminated.&lt;/p&gt;&#10;&lt;h2 id="prerequisites"&gt;Prerequisites&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Install &lt;a href="https://pig.center/docs/etcd/install/"&gt;&lt;code&gt;etcd&lt;/code&gt; and &lt;code&gt;etcdctl&lt;/code&gt;&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="creating-a-lock"&gt;Creating a lock&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;lock&lt;/code&gt; for distributed lock:&lt;/p&gt;&#10;&lt;img class="td-image" src="https://pig.center/docs/etcd/tasks/img/create-lock.gif" alt="08_etcdctl_lock_2016050501" loading="lazy" decoding="async"&gt;&lt;div class="td-code td-code--untitled" id="td-code-8efddd6b-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="shell" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-8efddd6b-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; lock mutex1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h3 id="options"&gt;Options&#10;&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;endpoints - defines a comma-delimited list of machine addresses in the cluster.&lt;/li&gt;&#10;&lt;li&gt;ttl - time out in seconds of lock session.&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>How to conduct leader election in etcd cluster</title><link>https://pig.center/docs/etcd/tasks/operator/how-to-conduct-elections/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/operator/how-to-conduct-elections/</guid><description>&lt;h2 id="prerequisites"&gt;Prerequisites&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Ensure &lt;a href="https://pig.center/docs/etcd/install/"&gt;&lt;code&gt;etcd&lt;/code&gt;&lt;/a&gt;&#10; and &lt;a href="https://pig.center/docs/etcd/install/"&gt;&lt;code&gt;etcdctl&lt;/code&gt;&lt;/a&gt;&#10; is installed.&lt;/li&gt;&#10;&lt;li&gt;Check for active etcd cluster.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="conduct-leader-election"&gt;Conduct Leader election&#10;&lt;/h2&gt;&#10;&lt;p&gt;The &lt;code&gt;etcdctl&lt;/code&gt; command is used to conduct leader elections in an etcd cluster. It makes sure that only one client can become leader at a time.&lt;/p&gt;&#10;&lt;p&gt;&lt;code&gt;etcdctl --endpoints=$ENDPOINTS elect &amp;lt;election-name&amp;gt; [proposal]&lt;/code&gt;&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-d18e5ec5-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="shell" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-d18e5ec5-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt; elect election-name p1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h3 id="options"&gt;Options&#10;&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;--endpoints : $ENDPOINTS&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Address of each etcd cluster members.&lt;/p&gt;</description></item><item><title>How to check Cluster status</title><link>https://pig.center/docs/etcd/tasks/operator/how-to-check-cluster-status/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/operator/how-to-check-cluster-status/</guid><description>&lt;h2 id="prerequisites"&gt;Prerequisites&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Install &lt;a href="https://pig.center/docs/etcd/install/"&gt;&lt;code&gt;etcd&lt;/code&gt; and &lt;code&gt;etcdctl&lt;/code&gt;&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="check-overall-status"&gt;Check Overall Status&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;endpoint status&lt;/code&gt; to check the overall status of each endpoint specified in &lt;code&gt;--endpoints&lt;/code&gt; flag:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-0c544481-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-0c544481-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl endpoint status &lt;span class="o"&gt;(&lt;/span&gt;--endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINTS&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;--cluster&lt;span class="o"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h3 id="options"&gt;Options&#10;&lt;/h3&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-0c544481-fence-1" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-0c544481-fence-1-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--cluster&lt;span class="o"&gt;[=&lt;/span&gt;false&lt;span class="o"&gt;]&lt;/span&gt;: use all endpoints from the cluster member list&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h2 id="check-health"&gt;Check Health&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;endpoint health&lt;/code&gt; to check the healthiness of each endpoint specified in &lt;code&gt;--endpoints&lt;/code&gt; flag:&lt;/p&gt;</description></item><item><title>How to save the database</title><link>https://pig.center/docs/etcd/tasks/operator/how-to-save-database/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/operator/how-to-save-database/</guid><description>&lt;h2 id="pre-requisites"&gt;Pre-requisites&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/install/"&gt;Install etcdctl, etcdutl&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/dev-guide/local_cluster/"&gt;Setup a local cluster&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="snapshot-a-database"&gt;Snapshot a database&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;snapshot&lt;/code&gt; to save point-in-time snapshot of etcd database:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-a75c8e93-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-a75c8e93-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ENDPOINT&lt;/span&gt; snapshot save DB_NAME&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h3 id="global-options"&gt;Global Options&#10;&lt;/h3&gt;&#10;&lt;h4 id="etcdctl"&gt;etcdctl&#10;&lt;/h4&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-a75c8e93-fence-1" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-a75c8e93-fence-1-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--endpoints&lt;span class="o"&gt;=[&lt;/span&gt;127.0.0.1:2379&lt;span class="o"&gt;]&lt;/span&gt;, gRPC endpoints&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;Snapshot can only be requested from one etcd node, so &lt;code&gt;--endpoints&lt;/code&gt; flag should contain only one endpoint.&lt;/p&gt;</description></item><item><title>Install</title><link>https://pig.center/docs/etcd/install/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/install/</guid><description>&lt;h2 id="requirements"&gt;Requirements&#10;&lt;/h2&gt;&#10;&lt;p&gt;Before installing etcd, see the following pages:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/op-guide/supported-platform/"&gt;Supported platforms&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/op-guide/hardware/"&gt;Hardware recommendations&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="install-pre-built-binaries"&gt;Install pre-built binaries&#10;&lt;/h2&gt;&#10;&lt;p&gt;The easiest way to install etcd is from pre-built binaries:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Download the compressed archive file for your platform from &lt;a href="https://github.com/etcd-io/etcd/releases/"&gt;Releases&lt;/a&gt;&#10;,&#10;choosing release &lt;a href="https://github.com/etcd-io/etcd/releases/tag/v3.7.0"&gt;v3.7.0&lt;/a&gt;&#10; or later.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Unpack the archive file. This results in a directory containing the binaries.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Add the executable binaries to your path. For example, rename and/or move&#10;the binaries to a directory in your path (like &lt;code&gt;/usr/local/bin&lt;/code&gt;), or add the&#10;directory created by the previous step to your path.&lt;/p&gt;</description></item><item><title>How to Add and Remove Members</title><link>https://pig.center/docs/etcd/tasks/operator/how-to-deal-with-membership/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tasks/operator/how-to-deal-with-membership/</guid><description>&lt;p&gt;&lt;code&gt;member&lt;/code&gt; to add,remove,update membership:&lt;/p&gt;&#10;&lt;img class="td-image" src="https://pig.center/docs/etcd/tasks/img/manage-members.gif" alt="13_etcdctl_member_2016062301" loading="lazy" decoding="async"&gt;&lt;div class="td-code td-code--untitled" id="td-code-a6a91e94-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="shell" data-td-line-count="46"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-a6a91e94-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# For each machine&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;my-etcd-token-1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;CLUSTER_STATE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;new&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;NAME_1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;etcd-node-1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;NAME_2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;etcd-node-2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;NAME_3&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;etcd-node-3&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;HOST_1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10.240.0.13&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;HOST_2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10.240.0.14&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;HOST_3&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10.240.0.15&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;CLUSTER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NAME_1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOST_1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380,&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NAME_2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOST_2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380,&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NAME_3&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOST_3&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# For node 1&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;THIS_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NAME_1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOST_1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcd --data-dir&lt;span class="o"&gt;=&lt;/span&gt;data.etcd --name &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_NAME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-advertise-peer-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--listen-peer-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--advertise-client-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2379 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--listen-client-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2379 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-cluster &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CLUSTER&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-cluster-state &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CLUSTER_STATE&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-cluster-token &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;TOKEN&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# For node 2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;THIS_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NAME_2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOST_2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcd --data-dir&lt;span class="o"&gt;=&lt;/span&gt;data.etcd --name &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_NAME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-advertise-peer-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--listen-peer-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--advertise-client-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2379 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--listen-client-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2379 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-cluster &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CLUSTER&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-cluster-state &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CLUSTER_STATE&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-cluster-token &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;TOKEN&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# For node 3&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;THIS_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NAME_3&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOST_3&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcd --data-dir&lt;span class="o"&gt;=&lt;/span&gt;data.etcd --name &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_NAME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-advertise-peer-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--listen-peer-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2380 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--advertise-client-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2379 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--listen-client-urls http://&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;THIS_IP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:2379 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-cluster &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CLUSTER&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-cluster-state &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CLUSTER_STATE&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;--initial-cluster-token &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;TOKEN&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;Then replace a member with &lt;code&gt;member remove&lt;/code&gt; and &lt;code&gt;member add&lt;/code&gt; commands:&lt;/p&gt;</description></item><item><title>Reporting bugs</title><link>https://pig.center/docs/etcd/reporting_bugs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/reporting_bugs/</guid><description>&lt;p&gt;If any part of the etcd project has bugs or documentation mistakes, please let us know by &lt;a href="https://github.com/etcd-io/etcd/issues/new"&gt;opening an issue&lt;/a&gt;&#10;. We treat bugs and mistakes very seriously and believe no issue is too small. Before creating a bug report, please check that an issue reporting the same problem does not already exist.&lt;/p&gt;&#10;&lt;p&gt;To make the bug report accurate and easy to understand, please try to create bug reports that are:&lt;/p&gt;</description></item><item><title>Tuning</title><link>https://pig.center/docs/etcd/tuning/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/tuning/</guid><description>&lt;p&gt;The default settings in etcd should work well for installations on a local network where the average network latency is low. However, when using etcd across multiple data centers or over networks with high latency, the heartbeat interval and election timeout settings may need tuning.&lt;/p&gt;&#10;&lt;p&gt;The network isn&amp;rsquo;t the only source of latency. Each request and response may be impacted by slow disks on both the leader and follower. Each of these timeouts represents the total time from request to successful response from the other machine.&lt;/p&gt;</description></item><item><title>Developer guide</title><link>https://pig.center/docs/etcd/dev-guide/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/dev-guide/</guid><description/></item><item><title>Interacting with etcd</title><link>https://pig.center/docs/etcd/dev-guide/interacting_v3/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/dev-guide/interacting_v3/</guid><description>&lt;p&gt;Users mostly interact with etcd by putting or getting the value of a key. This section describes how to do that by using etcdctl, a command line tool for interacting with etcd server. The concepts described here should apply to the gRPC APIs or client library APIs.&lt;/p&gt;&#10;&lt;p&gt;The API version used by etcdctl to speak to etcd may be set to version &lt;code&gt;2&lt;/code&gt; or &lt;code&gt;3&lt;/code&gt; via the &lt;code&gt;ETCDCTL_API&lt;/code&gt; environment variable. By default, etcdctl on master (3.4) uses the v3 API and earlier versions (3.3 and earlier) default to the v2 API.&lt;/p&gt;</description></item><item><title>gRPC naming and discovery</title><link>https://pig.center/docs/etcd/dev-guide/grpc_naming/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/dev-guide/grpc_naming/</guid><description>&lt;p&gt;etcd provides a gRPC resolver to support an alternative name system that fetches endpoints from etcd for discovering gRPC services. The underlying mechanism is based on watching updates to keys prefixed with the service name.&lt;/p&gt;&#10;&lt;p&gt;Note that this feature is experimental because it depends on the &lt;a href="https://github.com/grpc/grpc-go/tree/4cedec40eb2ccfbe3f56bb15e894903111ada2d2/resolver"&gt;google.golang.org/grpc/resolver&lt;/a&gt;&#10; package, which is still experimental in grpc-go.&lt;/p&gt;&#10;&lt;h2 id="using-etcd-discovery-with-go-grpc"&gt;Using etcd discovery with go-grpc&#10;&lt;/h2&gt;&#10;&lt;p&gt;The etcd client provides a gRPC resolver for resolving gRPC endpoints with an etcd backend. The resolver is initialized with an etcd client:&lt;/p&gt;</description></item><item><title>Embedding etcd in a Go Application</title><link>https://pig.center/docs/etcd/dev-guide/golang_embed_pkg/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/dev-guide/golang_embed_pkg/</guid><description>&lt;p&gt;The etcd &lt;code&gt;embed&lt;/code&gt; go package provides a simple way to embed an etcd server directly into your application.&lt;/p&gt;&#10;&lt;p&gt;For more details, see the &lt;a href="https://pkg.go.dev/go.etcd.io/etcd/server/v3/embed"&gt;embed package documentation&lt;/a&gt;&#10;.&lt;/p&gt;</description></item><item><title>Authentication Guides</title><link>https://pig.center/docs/etcd/op-guide/authentication/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/authentication/</guid><description/></item><item><title>Operations guide</title><link>https://pig.center/docs/etcd/op-guide/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/</guid><description/></item><item><title>Authentication</title><link>https://pig.center/docs/etcd/op-guide/authentication/authentication/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/authentication/authentication/</guid><description>&lt;p&gt;&lt;code&gt;auth&lt;/code&gt;,&lt;code&gt;user&lt;/code&gt;,&lt;code&gt;role&lt;/code&gt; for authentication:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-c766de36-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="shell" data-td-line-count="24"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-c766de36-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ETCDCTL_API&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;ENDPOINTS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;localhost:2379&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ENDPOINTS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; role add root&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ENDPOINTS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; role get root&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ENDPOINTS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; user add root&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ENDPOINTS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; user grant-role root root&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ENDPOINTS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; user get root&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ENDPOINTS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; role add role0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ENDPOINTS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; role grant-permission role0 readwrite foo&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ENDPOINTS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; user add user0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ENDPOINTS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; user grant-role user0 role0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ENDPOINTS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; auth &lt;span class="nb"&gt;enable&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# now all client requests go through auth&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ENDPOINTS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; --user&lt;span class="o"&gt;=&lt;/span&gt;user0:123 put foo bar&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ENDPOINTS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; get foo&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# permission denied, user name is empty because the request does not issue an authentication request&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ENDPOINTS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; --user&lt;span class="o"&gt;=&lt;/span&gt;user0:123 get foo&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# user0 can read the key foo&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;etcdctl --endpoints&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ENDPOINTS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; --user&lt;span class="o"&gt;=&lt;/span&gt;user0:123 get foo1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h3 id="note"&gt;Note:&#10;&lt;/h3&gt;&#10;&lt;p&gt;This is just a stub which needs to be filled and updated with more information on authentication. The text above is just a code example.&lt;/p&gt;</description></item><item><title>Role-based access control</title><link>https://pig.center/docs/etcd/op-guide/authentication/rbac/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/authentication/rbac/</guid><description>&lt;h2 id="overview"&gt;Overview&#10;&lt;/h2&gt;&#10;&lt;p&gt;Authentication was added in etcd 2.1. The etcd v3 API slightly modified the authentication feature&amp;rsquo;s API and user interface to better fit the new data model. This guide is intended to help users set up basic authentication and role-based access control in etcd v3.&lt;/p&gt;&#10;&lt;h2 id="special-users-and-roles"&gt;Special users and roles&#10;&lt;/h2&gt;&#10;&lt;p&gt;There is one special user, &lt;code&gt;root&lt;/code&gt;, and one special role, &lt;code&gt;root&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Transport security model</title><link>https://pig.center/docs/etcd/op-guide/security/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/security/</guid><description>&lt;p&gt;etcd supports automatic TLS as well as authentication through client certificates for both clients to server as well as peer (server to server / cluster) communication. &lt;strong&gt;Note that etcd doesn&amp;rsquo;t enable &lt;a href="https://pig.center/docs/etcd/op-guide/authentication/"&gt;RBAC based authentication&lt;/a&gt;&#10; or the authentication feature in the transport layer by default to reduce friction for users getting started with the database. Further, changing this default would be a breaking change for the project which was established since 2013. An etcd cluster which doesn&amp;rsquo;t enable security features can expose its data to any clients.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Clustering Guide</title><link>https://pig.center/docs/etcd/op-guide/clustering/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/clustering/</guid><description>&lt;h2 id="overview"&gt;Overview&#10;&lt;/h2&gt;&#10;&lt;p&gt;Starting an etcd cluster statically requires that each member knows another in the cluster. In a number of cases, the IPs of the cluster members may be unknown ahead of time. In these cases, the etcd cluster can be bootstrapped with the help of a discovery service.&lt;/p&gt;&#10;&lt;p&gt;Once an etcd cluster is up and running, adding or removing members is done via &lt;a href="https://pig.center/docs/etcd/op-guide/runtime-configuration/"&gt;runtime reconfiguration&lt;/a&gt;&#10;. To better understand the design behind runtime reconfiguration, we suggest reading &lt;a href="https://pig.center/docs/etcd/op-guide/runtime-reconf-design/"&gt;the runtime configuration design document&lt;/a&gt;&#10;.&lt;/p&gt;</description></item><item><title>Run etcd clusters as a Kubernetes StatefulSet</title><link>https://pig.center/docs/etcd/op-guide/kubernetes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/kubernetes/</guid><description>&lt;p&gt;Below demonstrates how to perform the &lt;a href="https://pig.center/docs/etcd/op-guide/clustering/#static"&gt;static bootstrap process&lt;/a&gt;&#10; as a Kubernetes StatefulSet.&lt;/p&gt;&#10;&lt;h2 id="example-manifest"&gt;Example Manifest&#10;&lt;/h2&gt;&#10;&lt;p&gt;This manifest contains a service and statefulset for deploying a static etcd cluster in kubernetes.&lt;/p&gt;&#10;&lt;p&gt;If you copy the contents of the manifest into a file named &lt;code&gt;etcd.yaml&lt;/code&gt;, it can be applied to a cluster with this command.&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-092ce8f7-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="shell" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-092ce8f7-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ kubectl apply --filename etcd.yaml&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;Upon being applied, wait for the pods to become ready.&lt;/p&gt;</description></item><item><title>Run etcd clusters inside containers</title><link>https://pig.center/docs/etcd/op-guide/container/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/container/</guid><description>&lt;p&gt;The following guide shows how to run etcd with Docker using the &lt;a href="https://pig.center/docs/etcd/op-guide/clustering/#static"&gt;static bootstrap process&lt;/a&gt;&#10;.&lt;/p&gt;&#10;&lt;h2 id="docker"&gt;Docker&#10;&lt;/h2&gt;&#10;&lt;p&gt;In order to expose the etcd API to clients outside of Docker host, use the host IP address of the container. Please see &lt;a href="https://docs.docker.com/engine/reference/commandline/inspect"&gt;&lt;code&gt;docker inspect&lt;/code&gt;&lt;/a&gt;&#10; for more detail on how to get the IP address. Alternatively, specify &lt;code&gt;--net=host&lt;/code&gt; flag to &lt;code&gt;docker run&lt;/code&gt; command to skip placing the container inside of a separate network stack.&lt;/p&gt;</description></item><item><title>Disaster recovery</title><link>https://pig.center/docs/etcd/op-guide/recovery/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/recovery/</guid><description>&lt;p&gt;etcd is designed to withstand machine failures. An etcd cluster automatically recovers from temporary failures (e.g., machine reboots) and tolerates up to &lt;em&gt;(N-1)/2&lt;/em&gt; permanent failures for a cluster of N members. When a member permanently fails, whether due to hardware failure or disk corruption, it loses access to the cluster. If the cluster permanently loses more than &lt;em&gt;(N-1)/2&lt;/em&gt; members then it disastrously fails, irrevocably losing quorum. Once quorum is lost, the cluster cannot reach consensus and therefore cannot continue accepting updates.&lt;/p&gt;</description></item><item><title>etcd gateway</title><link>https://pig.center/docs/etcd/op-guide/gateway/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/gateway/</guid><description>&lt;h2 id="what-is-etcd-gateway"&gt;What is etcd gateway&#10;&lt;/h2&gt;&#10;&lt;p&gt;etcd gateway is a simple TCP proxy that forwards network data to the etcd cluster. The gateway is stateless and transparent; it neither inspects client requests nor interferes with cluster responses. It does not terminate TLS connections, do TLS handshakes on behalf of its clients, or verify if the connection is secured.&lt;/p&gt;&#10;&lt;p&gt;The gateway supports multiple etcd server endpoints and works on a simple round-robin policy. It only routes to available endpoints and hides failures from its clients. Other retry policies, such as weighted round-robin, may be supported in the future.&lt;/p&gt;</description></item><item><title>gRPC proxy</title><link>https://pig.center/docs/etcd/op-guide/grpc_proxy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/grpc_proxy/</guid><description>&lt;p&gt;The gRPC proxy is a stateless etcd reverse proxy operating at the gRPC layer (L7). The proxy is designed to reduce the total processing load on the core etcd cluster. For horizontal scalability, it coalesces watch and lease API requests. To protect the cluster against abusive clients, it caches key range requests.&lt;/p&gt;&#10;&lt;p&gt;The gRPC proxy supports multiple etcd server endpoints. When the proxy starts, it randomly picks one etcd server endpoint to use. This endpoint serves all requests until the proxy detects an endpoint failure. If the gRPC proxy detects an endpoint failure, it switches to a different endpoint, if available, to hide failures from its clients. Other retry policies, such as weighted round-robin, may be supported in the future.&lt;/p&gt;</description></item><item><title>Maintenance</title><link>https://pig.center/docs/etcd/op-guide/maintenance/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/maintenance/</guid><description>&lt;h2 id="overview"&gt;Overview&#10;&lt;/h2&gt;&#10;&lt;p&gt;An etcd cluster needs periodic maintenance to remain reliable. Depending on an etcd application&amp;rsquo;s needs, this maintenance can usually be automated and performed without downtime or significantly degraded performance.&lt;/p&gt;&#10;&lt;p&gt;All etcd maintenance manages storage resources consumed by the etcd keyspace. Failure to adequately control the keyspace size is guarded by storage space quotas; if an etcd member runs low on space, a quota will trigger cluster-wide alarms which will put the system into a limited-operation maintenance mode. To avoid running out of space for writes to the keyspace, the etcd keyspace history must be compacted. Storage space itself may be reclaimed by defragmenting etcd members. Finally, periodic snapshot backups of etcd member state makes it possible to recover any unintended logical data loss or corruption caused by operational error.&lt;/p&gt;</description></item><item><title>Monitoring etcd</title><link>https://pig.center/docs/etcd/op-guide/monitoring/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/monitoring/</guid><description>&lt;p&gt;Each etcd server provides local monitoring information on its client port through http endpoints. The monitoring data is useful for both system health checking and cluster debugging.&lt;/p&gt;&#10;&lt;h2 id="debug-endpoint"&gt;Debug endpoint&#10;&lt;/h2&gt;&#10;&lt;p&gt;If &lt;code&gt;--log-level=debug&lt;/code&gt; is set, the etcd server exports debugging information on its client port under the &lt;code&gt;/debug&lt;/code&gt; path. Take care when setting &lt;code&gt;--log-level=debug&lt;/code&gt;, since there will be degraded performance and verbose logging.&lt;/p&gt;&#10;&lt;p&gt;The &lt;code&gt;/debug/pprof&lt;/code&gt; endpoint is the standard go runtime profiling endpoint. This can be used to profile CPU, heap, mutex, and goroutine utilization. For example, here &lt;code&gt;go tool pprof&lt;/code&gt; gets the top 10 functions where etcd spends its time:&lt;/p&gt;</description></item><item><title>Runtime reconfiguration</title><link>https://pig.center/docs/etcd/op-guide/runtime-configuration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/runtime-configuration/</guid><description>&lt;p&gt;etcd comes with support for incremental runtime reconfiguration, which allows users to update the membership of the cluster at run time.&lt;/p&gt;&#10;&lt;p&gt;Reconfiguration requests can only be processed when a majority of cluster members are functioning. It is &lt;strong&gt;highly recommended&lt;/strong&gt; to always have a cluster size greater than two in production. It is unsafe to remove a member from a two member cluster. The majority of a two member cluster is also two. If there is a failure during the removal process, the cluster might not be able to make progress and need to &lt;a href="#restart-cluster-from-majority-failure"&gt;restart from majority failure&lt;/a&gt;&#10;.&lt;/p&gt;</description></item><item><title>Data Corruption</title><link>https://pig.center/docs/etcd/op-guide/data_corruption/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/data_corruption/</guid><description>&lt;p&gt;etcd has built in automated data corruption detection to prevent member state from diverging.&lt;/p&gt;&#10;&lt;h2 id="enabling-data-corruption-detection"&gt;Enabling data corruption detection&#10;&lt;/h2&gt;&#10;&lt;p&gt;Data corruption detection can be done using:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Initial check, enabled with &lt;code&gt;--experimental-initial-corrupt-check&lt;/code&gt; flag.&lt;/li&gt;&#10;&lt;li&gt;Periodic check of:&#10;&lt;ul&gt;&#10;&lt;li&gt;Compacted revision hash, enabled with &lt;code&gt;--experimental-compact-hash-check-enabled&lt;/code&gt; flag.&lt;/li&gt;&#10;&lt;li&gt;Latest revision hash, enabled with &lt;code&gt;--experimental-corrupt-check-time&lt;/code&gt; flag.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Initial check will be executed during bootstrap of etcd member.&#10;Member will compare its persistent state vs other members and exit if there is a mismatch.&lt;/p&gt;</description></item><item><title>Downgrading</title><link>https://pig.center/docs/etcd/downgrades/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/downgrades/</guid><description/></item><item><title>Upgrading</title><link>https://pig.center/docs/etcd/upgrades/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/upgrades/</guid><description/></item><item><title>Downgrading etcd clusters and applications</title><link>https://pig.center/docs/etcd/downgrades/downgrading-etcd/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/downgrades/downgrading-etcd/</guid><description>&lt;p&gt;This section contains documents specific to downgrading etcd clusters and applications.&lt;/p&gt;&#10;&lt;h2 id="downgrading-an-etcd-v3x-cluster"&gt;Downgrading an etcd v3.x cluster&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/downgrades/downgrade_3_5/"&gt;Downgrade etcd from 3.5 to 3.4&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/downgrades/downgrade_3_6/"&gt;Downgrade etcd from 3.6 to 3.5&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/downgrades/downgrade_3_7/"&gt;Downgrade etcd from 3.7 to 3.6&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Upgrading etcd clusters and applications</title><link>https://pig.center/docs/etcd/upgrades/upgrading-etcd/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/upgrades/upgrading-etcd/</guid><description>&lt;p&gt;This section contains documents specific to upgrading etcd clusters and applications.&lt;/p&gt;&#10;&lt;h2 id="upgrade-policy"&gt;Upgrade policy&#10;&lt;/h2&gt;&#10;&lt;p&gt;Before upgrading, note that etcd only supports the following two upgrade cases:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Patch upgrade:&lt;/strong&gt; Upgrading between patch releases within the same minor version (e.g. 3.7.0 - 3.7.1).&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Minor upgrade:&lt;/strong&gt; Upgrading one minor version at a time (e.g. 3.6 - 3.7). Upgrades that skip a minor version are not supported and will likely fail. Update to the most recent patch version before upgrading to the next minor version.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="upgrading-an-etcd-v3x-cluster"&gt;Upgrading an etcd v3.x cluster&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/upgrades/upgrade_3_1/"&gt;Upgrade etcd from 3.0 to 3.1&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/upgrades/upgrade_3_2/"&gt;Upgrade etcd from 3.1 to 3.2&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/upgrades/upgrade_3_3/"&gt;Upgrade etcd from 3.2 to 3.3&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/upgrades/upgrade_3_4/"&gt;Upgrade etcd from 3.3 to 3.4&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/upgrades/upgrade_3_5/"&gt;Upgrade etcd from 3.4 to 3.5&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/upgrades/upgrade_3_6/"&gt;Upgrade etcd from 3.5 to 3.6&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/upgrades/upgrade_3_7/"&gt;Upgrade etcd from 3.6 to 3.7&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="upgrading-from-etcd-v23"&gt;Upgrading from etcd v2.3&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/upgrades/upgrade_3_0/"&gt;Upgrade a v2.3 cluster to v3.0&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Downgrade etcd from v3.7 to v3.6</title><link>https://pig.center/docs/etcd/downgrades/downgrade_3_7/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/downgrades/downgrade_3_7/</guid><description>&lt;p&gt;In the general case, downgrading from etcd v3.7 to v3.6 can be a zero-downtime, rolling downgrade:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;one by one, stop the etcd v3.7 processes and replace them with etcd v3.6 processes&lt;/li&gt;&#10;&lt;li&gt;after enabling the downgrade, new features in v3.7 are no longer available to the cluster&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Before &lt;a href="#downgrade-procedure"&gt;starting a downgrade&lt;/a&gt;&#10;, read through the rest of this guide to prepare.&lt;/p&gt;&#10;&lt;h3 id="downgrade-checklists"&gt;Downgrade checklists&#10;&lt;/h3&gt;&#10;&lt;p&gt;Highlighted differences between v3.7 and v3.6:&lt;/p&gt;</description></item><item><title>Upgrade etcd from v3.5 to v3.6</title><link>https://pig.center/docs/etcd/upgrades/upgrade_3_6/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/upgrades/upgrade_3_6/</guid><description>&lt;p&gt;In the general case, upgrading from etcd v3.5 to v3.6 can be a zero-downtime, rolling upgrade:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;one by one, stop the etcd v3.5 processes and replace them with etcd v3.6 processes&lt;/li&gt;&#10;&lt;li&gt;after running all v3.6 processes, new features in v3.6 are available to the cluster&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Before &lt;a href="#upgrade-procedure"&gt;starting an upgrade&lt;/a&gt;&#10;, read through the rest of this guide to prepare.&lt;/p&gt;&#10;&lt;h3 id="upgrade-checklists"&gt;Upgrade checklists&#10;&lt;/h3&gt;&#10;&lt;h4 id="update-35"&gt;Update 3.5&#10;&lt;/h4&gt;&#10;&lt;div class="td-callout td-callout--important" role="note"&gt;&#10; &lt;div class="td-callout__title"&gt;&lt;i class="td-callout__icon fa-solid fa-circle-exclamation" aria-hidden="true"&gt;&lt;/i&gt;&lt;span class="td-callout__label"&gt;Important&lt;/span&gt;&lt;/div&gt;&#10; &lt;div class="td-callout__body"&gt;&#10;&lt;p&gt;Before upgrading to 3.6, make sure that &lt;a href="https://etcd.io/blog/2026/july-patch-release/"&gt;all of your 3.5 members are updated to 3.5.32 or later&lt;/a&gt;&#10;. Patch releases 3.5.24 through 3.5.26 fix several potential upgrade blockers; &lt;a href="https://etcd.io/blog/2026/july-patch-release/"&gt;3.5.32&lt;/a&gt;&#10; adds &lt;code&gt;--v2-deprecation=write-only-skip-check&lt;/code&gt; and extends &lt;code&gt;etcdutl check v2store&lt;/code&gt; to inspect WAL records as well as the v2 snapshot.&lt;/p&gt;</description></item><item><title>Downgrade etcd from 3.5 to 3.4</title><link>https://pig.center/docs/etcd/downgrades/downgrade_3_5/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/downgrades/downgrade_3_5/</guid><description>&lt;p&gt;In the general case, downgrading from etcd 3.5 to 3.4 can be a zero-downtime, rolling downgrade:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;one by one, stop the etcd 3.5 processes and replace them with etcd 3.4 processes&lt;/li&gt;&#10;&lt;li&gt;after starting any 3.4 processes, new features in 3.5 are not longer available to the cluster&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Before &lt;a href="#downgrade-procedure"&gt;starting a downgrade&lt;/a&gt;&#10;, read through the rest of this guide to prepare.&lt;/p&gt;&#10;&lt;h3 id="downgrade-checklists"&gt;Downgrade checklists&#10;&lt;/h3&gt;&#10;&lt;p&gt;content/enhttps://etcd.io/docs/v3.5/op-guide/authentication/rbac.md&lt;/p&gt;&#10;&lt;div class="td-callout td-callout--warning" role="note"&gt;&#10; &lt;div class="td-callout__title"&gt;&lt;i class="td-callout__icon fa-solid fa-triangle-exclamation" aria-hidden="true"&gt;&lt;/i&gt;&lt;span class="td-callout__label"&gt;Warning&lt;/span&gt;&lt;/div&gt;&#10; &lt;div class="td-callout__body"&gt;&#10;&lt;p&gt;If your cluster enables auth, rolling downgrade from 3.5 isn&amp;rsquo;t supported because 3.5 &lt;a href="https://github.com/etcd-io/etcd/pull/11943"&gt;changes a format of WAL entries related to auth&lt;/a&gt;&#10;. You can follow the &lt;a href="https://pig.center/docs/etcd/op-guide/authentication/rbac/"&gt;authentification instructions&lt;/a&gt;&#10; to disable auth, and delete all users first.&lt;/p&gt;</description></item><item><title>Downgrade etcd from v3.6 to v3.5</title><link>https://pig.center/docs/etcd/downgrades/downgrade_3_6/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/downgrades/downgrade_3_6/</guid><description>&lt;p&gt;In the general case, downgrading from etcd v3.6 to v3.5 can be a zero-downtime, rolling downgrade:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;one by one, stop the etcd v3.6 processes and replace them with etcd v3.5 processes&lt;/li&gt;&#10;&lt;li&gt;after enabling the downgrade, new features in v3.6 are no longer available to the cluster&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Before &lt;a href="#downgrade-procedure"&gt;starting a downgrade&lt;/a&gt;&#10;, read through the rest of this guide to prepare.&lt;/p&gt;&#10;&lt;h3 id="downgrade-checklists"&gt;Downgrade checklists&#10;&lt;/h3&gt;&#10;&lt;p&gt;Highlighted breaking changes from v3.6 to v3.5:&lt;/p&gt;</description></item><item><title>Upgrade etcd from 3.4 to 3.5</title><link>https://pig.center/docs/etcd/upgrades/upgrade_3_5/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/upgrades/upgrade_3_5/</guid><description>&lt;p&gt;In the general case, upgrading from etcd 3.4 to 3.5 can be a zero-downtime, rolling upgrade:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;one by one, stop the etcd v3.4 processes and replace them with etcd v3.5 processes&lt;/li&gt;&#10;&lt;li&gt;after running all v3.5 processes, new features in v3.5 are available to the cluster&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Before &lt;a href="#upgrade-procedure"&gt;starting an upgrade&lt;/a&gt;&#10;, read through the rest of this guide to prepare.&lt;/p&gt;&#10;&lt;h3 id="upgrade-checklists"&gt;Upgrade checklists&#10;&lt;/h3&gt;&#10;&lt;div class="td-callout td-callout--warning" role="note"&gt;&#10; &lt;div class="td-callout__title"&gt;&lt;i class="td-callout__icon fa-solid fa-triangle-exclamation" aria-hidden="true"&gt;&lt;/i&gt;&lt;span class="td-callout__label"&gt;Warning&lt;/span&gt;&lt;/div&gt;&#10; &lt;div class="td-callout__body"&gt;&#10;&lt;p&gt;When &lt;a href="https://github.com/etcd-io/etcd/issues/9480"&gt;migrating from v2 with no v3 data&lt;/a&gt;&#10;, etcd server v3.2+ panics when etcd restores from existing snapshots but no v3 &lt;code&gt;ETCD_DATA_DIR/member/snap/db&lt;/code&gt; file. This happens when the server had migrated from v2 with no previous v3 data. This also prevents accidental v3 data loss (e.g. &lt;code&gt;db&lt;/code&gt; file might have been moved). etcd requires that post v3 migration can only happen with v3 data. Do not upgrade to newer v3 versions until v3.0 server contains v3 data.&lt;/p&gt;</description></item><item><title>Upgrade etcd from 3.3 to 3.4</title><link>https://pig.center/docs/etcd/upgrades/upgrade_3_4/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/upgrades/upgrade_3_4/</guid><description>&lt;p&gt;In the general case, upgrading from etcd 3.3 to 3.4 can be a zero-downtime, rolling upgrade:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;one by one, stop the etcd v3.3 processes and replace them with etcd v3.4 processes&lt;/li&gt;&#10;&lt;li&gt;after running all v3.4 processes, new features in v3.4 are available to the cluster&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Before &lt;a href="#upgrade-procedure"&gt;starting an upgrade&lt;/a&gt;&#10;, read through the rest of this guide to prepare.&lt;/p&gt;&#10;&lt;h3 id="upgrade-checklists"&gt;Upgrade checklists&#10;&lt;/h3&gt;&#10;&lt;div class="td-callout td-callout--warning" role="note"&gt;&#10; &lt;div class="td-callout__title"&gt;&lt;i class="td-callout__icon fa-solid fa-triangle-exclamation" aria-hidden="true"&gt;&lt;/i&gt;&lt;span class="td-callout__label"&gt;Warning&lt;/span&gt;&lt;/div&gt;&#10; &lt;div class="td-callout__body"&gt;&#10;&lt;p&gt;When &lt;a href="https://github.com/etcd-io/etcd/issues/9480"&gt;migrating from v2 with no v3 data&lt;/a&gt;&#10;, etcd server v3.2+ panics when etcd restores from existing snapshots but no v3 &lt;code&gt;ETCD_DATA_DIR/member/snap/db&lt;/code&gt; file. This happens when the server had migrated from v2 with no previous v3 data. This also prevents accidental v3 data loss (e.g. &lt;code&gt;db&lt;/code&gt; file might have been moved). etcd requires that post v3 migration can only happen with v3 data. Do not upgrade to newer v3 versions until v3.0 server contains v3 data.&lt;/p&gt;</description></item><item><title>Upgrade etcd from v3.6 to v3.7</title><link>https://pig.center/docs/etcd/upgrades/upgrade_3_7/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/upgrades/upgrade_3_7/</guid><description>&lt;p&gt;In the general case, upgrading from etcd v3.6 to v3.7 can be a zero-downtime, rolling upgrade:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;one by one, stop the etcd v3.6 processes and replace them with etcd v3.7 processes&lt;/li&gt;&#10;&lt;li&gt;after running all v3.7 processes, new features in v3.7 are available to the cluster&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Before &lt;a href="#upgrade-procedure"&gt;starting an upgrade&lt;/a&gt;&#10;, read through the rest of this guide to prepare.&lt;/p&gt;&#10;&lt;h3 id="upgrade-checklists"&gt;Upgrade checklists&#10;&lt;/h3&gt;&#10;&lt;h4 id="update-36"&gt;Update 3.6&#10;&lt;/h4&gt;&#10;&lt;div class="td-callout td-callout--important" role="note"&gt;&#10; &lt;div class="td-callout__title"&gt;&lt;i class="td-callout__icon fa-solid fa-circle-exclamation" aria-hidden="true"&gt;&lt;/i&gt;&lt;span class="td-callout__label"&gt;Important&lt;/span&gt;&lt;/div&gt;&#10; &lt;div class="td-callout__body"&gt;&#10;&lt;p&gt;Before upgrading to 3.7, make sure that all of your 3.6 members are updated to 3.6.11 or later. Earlier 3.6 patch releases may not be compatible with a rolling upgrade to 3.7.&lt;/p&gt;</description></item><item><title>Upgrade etcd from 3.2 to 3.3</title><link>https://pig.center/docs/etcd/upgrades/upgrade_3_3/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/upgrades/upgrade_3_3/</guid><description>&lt;p&gt;In the general case, upgrading from etcd 3.2 to 3.3 can be a zero-downtime, rolling upgrade:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;one by one, stop the etcd v3.2 processes and replace them with etcd v3.3 processes&lt;/li&gt;&#10;&lt;li&gt;after running all v3.3 processes, new features in v3.3 are available to the cluster&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Before &lt;a href="#upgrade-procedure"&gt;starting an upgrade&lt;/a&gt;&#10;, read through the rest of this guide to prepare.&lt;/p&gt;&#10;&lt;h3 id="upgrade-checklists"&gt;Upgrade checklists&#10;&lt;/h3&gt;&#10;&lt;div class="td-callout td-callout--warning" role="note"&gt;&#10; &lt;div class="td-callout__title"&gt;&lt;i class="td-callout__icon fa-solid fa-triangle-exclamation" aria-hidden="true"&gt;&lt;/i&gt;&lt;span class="td-callout__label"&gt;Warning&lt;/span&gt;&lt;/div&gt;&#10; &lt;div class="td-callout__body"&gt;&#10;&lt;p&gt;When &lt;a href="https://github.com/etcd-io/etcd/issues/9480"&gt;migrating from v2 with no v3 data&lt;/a&gt;&#10;, etcd server v3.2+ panics when etcd restores from existing snapshots but no v3 &lt;code&gt;ETCD_DATA_DIR/member/snap/db&lt;/code&gt; file. This happens when the server had migrated from v2 with no previous v3 data. This also prevents accidental v3 data loss (e.g. &lt;code&gt;db&lt;/code&gt; file might have been moved). etcd requires that post v3 migration can only happen with v3 data. Do not upgrade to newer v3 versions until v3.0 server contains v3 data.&lt;/p&gt;</description></item><item><title>Upgrade etcd from 3.1 to 3.2</title><link>https://pig.center/docs/etcd/upgrades/upgrade_3_2/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/upgrades/upgrade_3_2/</guid><description>&lt;p&gt;In the general case, upgrading from etcd 3.1 to 3.2 can be a zero-downtime, rolling upgrade:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;one by one, stop the etcd v3.1 processes and replace them with etcd v3.2 processes&lt;/li&gt;&#10;&lt;li&gt;after running all v3.2 processes, new features in v3.2 are available to the cluster&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Before &lt;a href="#upgrade-procedure"&gt;starting an upgrade&lt;/a&gt;&#10;, read through the rest of this guide to prepare.&lt;/p&gt;&#10;&lt;h3 id="upgrade-checklists"&gt;Upgrade checklists&#10;&lt;/h3&gt;&#10;&lt;div class="td-callout td-callout--warning" role="note"&gt;&#10; &lt;div class="td-callout__title"&gt;&lt;i class="td-callout__icon fa-solid fa-triangle-exclamation" aria-hidden="true"&gt;&lt;/i&gt;&lt;span class="td-callout__label"&gt;Warning&lt;/span&gt;&lt;/div&gt;&#10; &lt;div class="td-callout__body"&gt;&#10;&lt;p&gt;When &lt;a href="https://github.com/etcd-io/etcd/issues/9480"&gt;migrating from v2 with no v3 data&lt;/a&gt;&#10;, etcd server v3.2+ panics when etcd restores from existing snapshots but no v3 &lt;code&gt;ETCD_DATA_DIR/member/snap/db&lt;/code&gt; file. This happens when the server had migrated from v2 with no previous v3 data. This also prevents accidental v3 data loss (e.g. &lt;code&gt;db&lt;/code&gt; file might have been moved). etcd requires that post v3 migration can only happen with v3 data. Do not upgrade to newer v3 versions until v3.0 server contains v3 data.&lt;/p&gt;</description></item><item><title>Upgrade etcd from 3.0 to 3.1</title><link>https://pig.center/docs/etcd/upgrades/upgrade_3_1/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/upgrades/upgrade_3_1/</guid><description>&lt;p&gt;In the general case, upgrading from etcd 3.0 to 3.1 can be a zero-downtime, rolling upgrade:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;one by one, stop the etcd v3.0 processes and replace them with etcd v3.1 processes&lt;/li&gt;&#10;&lt;li&gt;after running all v3.1 processes, new features in v3.1 are available to the cluster&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Before &lt;a href="#upgrade-procedure"&gt;starting an upgrade&lt;/a&gt;&#10;, read through the rest of this guide to prepare.&lt;/p&gt;&#10;&lt;h3 id="upgrade-checklists"&gt;Upgrade checklists&#10;&lt;/h3&gt;&#10;&lt;div class="td-callout td-callout--warning" role="note"&gt;&#10; &lt;div class="td-callout__title"&gt;&lt;i class="td-callout__icon fa-solid fa-triangle-exclamation" aria-hidden="true"&gt;&lt;/i&gt;&lt;span class="td-callout__label"&gt;Warning&lt;/span&gt;&lt;/div&gt;&#10; &lt;div class="td-callout__body"&gt;&#10;&lt;p&gt;When &lt;a href="https://github.com/etcd-io/etcd/issues/9480"&gt;migrating from v2 with no v3 data&lt;/a&gt;&#10;, etcd server v3.2+ panics when etcd restores from existing snapshots but no v3 &lt;code&gt;ETCD_DATA_DIR/member/snap/db&lt;/code&gt; file. This happens when the server had migrated from v2 with no previous v3 data. This also prevents accidental v3 data loss (e.g. &lt;code&gt;db&lt;/code&gt; file might have been moved). etcd requires that post v3 migration can only happen with v3 data. Do not upgrade to newer v3 versions until v3.0 server contains v3 data.&lt;/p&gt;</description></item><item><title>Upgrade etcd from 2.3 to 3.0</title><link>https://pig.center/docs/etcd/upgrades/upgrade_3_0/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/upgrades/upgrade_3_0/</guid><description>&lt;p&gt;In the general case, upgrading from etcd 2.3 to 3.0 can be a zero-downtime, rolling upgrade:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;one by one, stop the etcd v2.3 processes and replace them with etcd v3.0 processes&lt;/li&gt;&#10;&lt;li&gt;after running all v3.0 processes, new features in v3.0 are available to the cluster&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Before &lt;a href="#upgrade-procedure"&gt;starting an upgrade&lt;/a&gt;&#10;, read through the rest of this guide to prepare.&lt;/p&gt;&#10;&lt;h3 id="upgrade-checklists"&gt;Upgrade checklists&#10;&lt;/h3&gt;&#10;&lt;div class="td-callout td-callout--warning" role="note"&gt;&#10; &lt;div class="td-callout__title"&gt;&lt;i class="td-callout__icon fa-solid fa-triangle-exclamation" aria-hidden="true"&gt;&lt;/i&gt;&lt;span class="td-callout__label"&gt;Warning&lt;/span&gt;&lt;/div&gt;&#10; &lt;div class="td-callout__body"&gt;&#10;&lt;p&gt;When &lt;a href="https://github.com/etcd-io/etcd/issues/9480"&gt;migrating from v2 with no v3 data&lt;/a&gt;&#10;, etcd server v3.2+ panics when etcd restores from existing snapshots but no v3 &lt;code&gt;ETCD_DATA_DIR/member/snap/db&lt;/code&gt; file. This happens when the server had migrated from v2 with no previous v3 data. This also prevents accidental v3 data loss (e.g. &lt;code&gt;db&lt;/code&gt; file might have been moved). etcd requires that post v3 migration can only happen with v3 data. Do not upgrade to newer v3 versions until v3.0 server contains v3 data.&lt;/p&gt;</description></item><item><title>Triage</title><link>https://pig.center/docs/etcd/triage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/triage/</guid><description/></item><item><title>Issue triage guidelines</title><link>https://pig.center/docs/etcd/triage/issues/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/triage/issues/</guid><description>&lt;h2 id="purpose"&gt;Purpose&#10;&lt;/h2&gt;&#10;&lt;p&gt;Speed up issue management.&lt;/p&gt;&#10;&lt;p&gt;The &lt;code&gt;etcd&lt;/code&gt; issues are listed at &lt;a href="https://github.com/etcd-io/etcd/issues"&gt;https://github.com/etcd-io/etcd/issues&lt;/a&gt;&#10;&#10;and are identified with labels. For example, an issue that is identified&#10;as a bug will eventually be set to label &lt;code&gt;area/bug &lt;/code&gt;. New issues will&#10;start out without any labels, but typically &lt;code&gt;etcd&lt;/code&gt; maintainers and active contributors&#10;add labels based on their findings. The detailed list of labels can be found at&#10;&lt;a href="https://github.com/kubernetes/kubernetes/labels"&gt;https://github.com/kubernetes/kubernetes/labels&lt;/a&gt;&#10;&lt;/p&gt;&#10;&lt;p&gt;Following are few predetermined searches on issues for convenience:&lt;/p&gt;</description></item><item><title>PR management</title><link>https://pig.center/docs/etcd/triage/prs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/triage/prs/</guid><description>&lt;h2 id="purpose"&gt;Purpose&#10;&lt;/h2&gt;&#10;&lt;p&gt;Speed up PR management.&lt;/p&gt;&#10;&lt;p&gt;The &lt;code&gt;etcd&lt;/code&gt; PRs are listed at &lt;a href="https://github.com/etcd-io/etcd/pulls"&gt;https://github.com/etcd-io/etcd/pulls&lt;/a&gt;&#10;&#10;A PR can have various labels, milestone, reviewer etc. The detailed list of labels can be found at&#10;&lt;a href="https://github.com/kubernetes/kubernetes/labels"&gt;https://github.com/kubernetes/kubernetes/labels&lt;/a&gt;&#10;&lt;/p&gt;&#10;&lt;p&gt;Following are few example searches on PR for convenience:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://github.com/etcd-io/etcd/pulls?utf8=%E2%9C%93&amp;amp;q=is%3Apr&amp;#43;is%3Aopen&amp;#43;milestone%3Aetcd-v3.4"&gt;Open PRS for milestone etcd-v3.4&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://github.com/etcd-io/etcd/labels/Investigating"&gt;PRs under investigation&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="scope"&gt;Scope&#10;&lt;/h2&gt;&#10;&lt;p&gt;These guidelines serves as a primary document for managing PRs in &lt;code&gt;etcd&lt;/code&gt;. Everyone is welcome to help manage PRs but the work and responsibilities discussed in this document is created with &lt;code&gt;etcd&lt;/code&gt; maintainers and active contributors in mind.&lt;/p&gt;</description></item></channel></rss>