<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Concept on PIG.CENTER</title><link>https://pig.center/categories/concept/</link><description>Recent content in Concept 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/concept/index.xml" rel="self" type="application/rss+xml"/><item><title>Features</title><link>https://pig.center/docs/pgbouncer/features/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/pgbouncer/features/</guid><description>&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Several levels of brutality when rotating connections:&lt;/p&gt;&#10;&lt;dl&gt;&#10;&lt;dt&gt;&lt;strong&gt;Session pooling&lt;/strong&gt;&lt;/dt&gt;&#10;&lt;dd&gt;Most polite method. When a client connects, a server connection will be assigned to it for the whole duration it stays connected. When the client disconnects, the server connection will be put back into pool. This mode supports all PostgreSQL features.&lt;/dd&gt;&#10;&lt;dt&gt;&lt;strong&gt;Transaction pooling&lt;/strong&gt;&lt;/dt&gt;&#10;&lt;dd&gt;A server connection is assigned to a client only during a transaction. When PgBouncer notices that the transaction is over, the server will be put back into the pool. This mode breaks a few session-based features of PostgreSQL. You can use it only when the application cooperates by not using features that break. See the table below for incompatible features.&lt;/dd&gt;&#10;&lt;dt&gt;&lt;strong&gt;Statement pooling&lt;/strong&gt;&lt;/dt&gt;&#10;&lt;dd&gt;Most aggressive method. This is transaction pooling with a twist: Multi-statement transactions are disallowed. This is meant to enforce &amp;ldquo;autocommit&amp;rdquo; mode on the client, mostly targeted at PL/Proxy.&lt;/dd&gt;&#10;&lt;/dl&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Low memory requirements (2 kB per connection by default). This is because PgBouncer does not need to see full packets at once.&lt;/p&gt;</description></item><item><title>Introduction</title><link>https://pig.center/docs/patroni/readme/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/readme/</guid><description>&lt;p&gt;&lt;a id="readme"&gt;&lt;/a&gt;&#10;Patroni is a template for high availability (HA) PostgreSQL solutions using Python. Patroni originated as a fork of &lt;a href="https://github.com/compose/governor"&gt;Governor&lt;/a&gt;&#10;, the project from Compose. It includes plenty of new features.&lt;/p&gt;&#10;&lt;p&gt;For additional background info, see:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=iruaCgeG7qs"&gt;PostgreSQL HA with Kubernetes and Patroni&lt;/a&gt;&#10;, talk by Josh Berkus at KubeCon 2016 (video)&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://engineering.zalando.com/posts/2016/02/zalandos-patroni-a-template-for-high-availability-postgresql.html"&gt;Feb. 2016 Zalando Tech blog post&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="development-status"&gt;Development Status&#10;&lt;/h2&gt;&#10;&lt;p&gt;Patroni is in active development and accepts contributions. See our &lt;a href="https://pig.center/docs/patroni/contributing_guidelines/#contributing_guidelines"&gt;Contributing&lt;/a&gt;&#10; section below for more details.&lt;/p&gt;</description></item><item><title>Patroni 4.1.5 Documentation</title><link>https://pig.center/docs/patroni/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/</guid><description>&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;Running Patroni on &lt;strong&gt;memory-restricted systems with Python 3.11+&lt;/strong&gt;&lt;/p&gt;&#10; &lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;If you run Patroni on a system with strict memory limits, for example with &lt;code&gt;vm.overcommit_memory=2&lt;/code&gt; (recommended for PostgreSQL), and use Python 3.11 or newer, you may observe unexpected behavior:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Patroni appears healthy&lt;/li&gt;&#10;&lt;li&gt;PostgreSQL continues to run&lt;/li&gt;&#10;&lt;li&gt;Patroni &lt;strong&gt;REST API becomes unresponsive&lt;/strong&gt;&lt;/li&gt;&#10;&lt;li&gt;The operating system reports that Patroni is listening on the REST API port&lt;/li&gt;&#10;&lt;li&gt;Patroni logs look normal; however, following messages may appear once: &lt;code&gt;Exception ignored in thread started by: &amp;lt;object repr() failed&amp;gt;&lt;/code&gt;, &lt;code&gt;MemoryError&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;Kernel logs may contain messages such as &lt;code&gt;not enough memory for the allocation&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;This behavior is caused by a &lt;a href="https://github.com/python/cpython/issues/140746"&gt;bug in Python 3.11+&lt;/a&gt;&#10;. Under strict memory conditions, starting a new thread may hang indefinitely when there is not enough free memory.&lt;/p&gt;</description></item><item><title>Load Balancing Fundamentals</title><link>https://pig.center/docs/haproxy/load-balancing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/load-balancing/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;This document is an introduction to HAProxy for all those who don&amp;rsquo;t know it, as well as for those&#10;who want to re-discover it when they know older versions. Its primary focus is to provide users with&#10;all the elements to decide if HAProxy is the product they&amp;rsquo;re looking for or not. Advanced users may&#10;find here some parts of solutions to some ideas they had just because they were not aware of a given&#10;new feature. Some sizing information is also provided, the product&amp;rsquo;s lifecycle is explained, and&#10;comparisons with partially overlapping products are provided.&lt;/p&gt;</description></item><item><title>pgBackRest 2.59.1 Documentation</title><link>https://pig.center/docs/pgbackrest/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/pgbackrest/</guid><description>&lt;hr&gt;&#10;&lt;h2 id="introduction"&gt;Introduction&#10;&lt;/h2&gt;&#10;&lt;p&gt;pgBackRest is a reliable backup and restore solution for PostgreSQL that seamlessly scales up to the largest databases and workloads.&lt;/p&gt;&#10;&lt;p&gt;pgBackRest &lt;a href="https://github.com/pgbackrest/pgbackrest/releases/tag/release/2.59.1"&gt;v2.59.1&lt;/a&gt;&#10; is the current stable release. Release notes are on the &lt;a href="https://pig.center/docs/pgbackrest/release/"&gt;Releases&lt;/a&gt;&#10; page.&lt;/p&gt;&#10;&lt;p&gt;Please give us a star on &lt;a href="https://github.com/pgbackrest/pgbackrest"&gt;GitHub&lt;/a&gt;&#10; if you like pgBackRest!&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="news"&gt;News&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;August 17, 2026&lt;/strong&gt; - &lt;a href="https://pig.center/docs/pgbackrest/news/#release-2-59-1"&gt;pgBackRest 2.59.1 Released&lt;/a&gt;&#10;&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;July 20, 2026&lt;/strong&gt; - &lt;a href="https://pig.center/docs/pgbackrest/news/#distribution-tarball"&gt;New Distribution Tarball&lt;/a&gt;&#10;&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;July 20, 2026&lt;/strong&gt; - &lt;a href="https://pig.center/docs/pgbackrest/news/#release-2-59-0"&gt;pgBackRest 2.59.0 Released&lt;/a&gt;&#10;&lt;/p&gt;</description></item><item><title>What HAProxy Is and How It Works</title><link>https://pig.center/docs/haproxy/architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/architecture/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;HAProxy is written as &amp;ldquo;HAProxy&amp;rdquo; to designate the product, and as &amp;ldquo;haproxy&amp;rdquo; to designate the&#10;executable program, software package or a process. However, both are commonly used for both&#10;purposes, and are pronounced H-A-Proxy. Very early, &amp;ldquo;haproxy&amp;rdquo; used to stand for &amp;ldquo;high availability&#10;proxy&amp;rdquo; and the name was written in two separate words, though by now it means nothing else than&#10;&amp;ldquo;HAProxy&amp;rdquo;.&lt;/p&gt;</description></item><item><title>PgBouncer 1.25.2 Documentation</title><link>https://pig.center/docs/pgbouncer/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/pgbouncer/</guid><description>&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;&#10;&lt;p&gt;The aim of &lt;strong&gt;pgbouncer&lt;/strong&gt; is to lower the performance impact of opening&#10;new connections to PostgreSQL.&lt;/p&gt;&#10;&lt;p&gt;In order not to compromise transaction semantics for connection&#10;pooling, &lt;strong&gt;pgbouncer&lt;/strong&gt; supports several types of pooling when&#10;rotating connections:&lt;/p&gt;</description></item><item><title>Basic Features</title><link>https://pig.center/docs/haproxy/basic-features/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/basic-features/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;This section will enumerate a number of features that HAProxy implements, some of which are&#10;generally expected from any modern load balancer, and some of which are a direct benefit of&#10;HAProxy&amp;rsquo;s architecture. More advanced features will be detailed in the next section.&lt;/p&gt;&#10;&lt;h2 id="section-3-3-1"&gt;3.3.1. Basic features : Proxying&#10;&lt;/h2&gt;&#10;&lt;p&gt;Proxying is the action of transferring data between a client and a server over two independent&#10;connections. The following basic features are supported by HAProxy regarding proxying and connection&#10;management:&lt;/p&gt;</description></item><item><title>pgBadger 13.2 Documentation</title><link>https://pig.center/docs/pgbadger/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/pgbadger/</guid><description>&lt;img class="td-image" src="https://pig.center/img/docs/pgbadger/logo.png" alt="pgBadger logo" title="pgBadger" loading="lazy" decoding="async"&gt;&lt;p&gt;&lt;strong&gt;pgBadger&lt;/strong&gt; is a fast, standalone PostgreSQL log analyzer written in Perl. It reads PostgreSQL or PgBouncer logs and produces detailed HTML, text, binary, JSON, or raw CSV output. The HTML reports are self-contained, interactive, zoomable, and need only a web browser to view.&lt;/p&gt;&#10;&lt;h2 id="why-pgbadger"&gt;Why pgBadger&#10;&lt;/h2&gt;&#10;&lt;p&gt;pgBadger is designed for large logs and operational use:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;one Perl program, with no mandatory non-core Perl modules;&lt;/li&gt;&#10;&lt;li&gt;automatic detection of &lt;code&gt;stderr&lt;/code&gt;, &lt;code&gt;syslog&lt;/code&gt;, &lt;code&gt;csvlog&lt;/code&gt;, &lt;code&gt;jsonlog&lt;/code&gt;, RDS, Cloud SQL, logplex, Redshift, and PgBouncer input;&lt;/li&gt;&#10;&lt;li&gt;direct reading of local files, standard input, remote files over SSH, and HTTP, FTP, or SFTP URLs;&lt;/li&gt;&#10;&lt;li&gt;gzip, bzip2, lz4, xz, zip, and zstd compressed input;&lt;/li&gt;&#10;&lt;li&gt;parallel parsing of one large file or many smaller files;&lt;/li&gt;&#10;&lt;li&gt;daily, weekly, and on-demand monthly incremental reports;&lt;/li&gt;&#10;&lt;li&gt;filters by time, database, user, client, application, process, session, and query pattern.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="report-coverage"&gt;What the reports contain&#10;&lt;/h2&gt;&#10;&lt;p&gt;The PostgreSQL report set covers:&lt;/p&gt;</description></item><item><title>Standard Features</title><link>https://pig.center/docs/haproxy/standard-features/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/standard-features/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;In this section, some features that are very commonly used in HAProxy but are not necessarily&#10;present on other load balancers are enumerated.&lt;/p&gt;&#10;&lt;h2 id="section-3-4-1"&gt;3.4.1. Standard features : Sampling and converting information&#10;&lt;/h2&gt;&#10;&lt;p&gt;HAProxy supports information sampling using a wide set of &amp;ldquo;sample fetch functions&amp;rdquo;. The principle is&#10;to extract pieces of information known as samples, for immediate use. This is used for stickiness,&#10;to build conditions, to produce information in logs or to enrich HTTP headers.&lt;/p&gt;</description></item><item><title>Advanced Features</title><link>https://pig.center/docs/haproxy/advanced-features/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/advanced-features/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;h2 id="section-3-5-1"&gt;3.5.1. Advanced features : Management&#10;&lt;/h2&gt;&#10;&lt;p&gt;HAProxy is designed to remain extremely stable and safe to manage in a regular production&#10;environment. It is provided as a single executable file which doesn&amp;rsquo;t require any installation&#10;process. Multiple versions can easily coexist, meaning that it&amp;rsquo;s possible (and recommended) to&#10;upgrade instances progressively by order of importance instead of migrating all of them at once.&#10;Configuration files are easily versioned. Configuration checking is done off-line so it doesn&amp;rsquo;t&#10;require to restart a service that will possibly fail. During configuration checks, a number of&#10;advanced mistakes may be detected (e.g. a rule hiding another one, or stickiness that will not work)&#10;and detailed warnings and configuration hints are proposed to fix them. Backwards configuration file&#10;compatibility goes very far away in time, with version 1.5 still fully supporting configurations for&#10;versions 1.1 written 13 years before, and 1.6 only dropping support for almost unused, obsolete&#10;keywords that can be done differently. The configuration and software upgrade mechanism is smooth&#10;and non disruptive in that it allows old and new processes to coexist on the system, each handling&#10;its own connections. System status, build options, and library compatibility are reported on&#10;startup.&lt;/p&gt;</description></item><item><title>etcd 3.7 Documentation</title><link>https://pig.center/docs/etcd/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/</guid><description>&lt;p&gt;etcd is a strongly consistent, distributed key-value store. These guides cover installing and&#10;operating etcd, building applications against its APIs, understanding its design, measuring&#10;performance, and upgrading or downgrading clusters in the 3.7 release line.&lt;/p&gt;&#10;&lt;p&gt;Start with &lt;a href="https://pig.center/docs/etcd/quickstart/"&gt;Quickstart&lt;/a&gt;&#10; for a local single-member cluster, &lt;a href="https://pig.center/docs/etcd/install/"&gt;Install&lt;/a&gt;&#10;&#10;for supported installation paths, or &lt;a href="https://pig.center/docs/etcd/op-guide/"&gt;Operations guide&lt;/a&gt;&#10; for production deployments.&lt;/p&gt;</description></item><item><title>Replication modes</title><link>https://pig.center/docs/patroni/replication_modes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/replication_modes/</guid><description>&lt;p&gt;&lt;a id="replication_modes"&gt;&lt;/a&gt;&#10;Patroni uses PostgreSQL streaming replication. For more information about streaming replication, see the &lt;a href="http://www.postgresql.org/docs/current/static/warm-standby.html#STREAMING-REPLICATION"&gt;Postgres documentation&lt;/a&gt;&#10;. By default Patroni configures PostgreSQL for asynchronous replication. Choosing your replication schema is dependent on your business considerations. Investigate both async and sync replication, as well as other HA solutions, to determine which solution is best for you.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="asynchronous-mode-durability"&gt;Asynchronous mode durability&#10;&lt;/h2&gt;&#10;&lt;p&gt;In asynchronous mode the cluster is allowed to lose some committed transactions to ensure availability. When the primary server fails or becomes unavailable for any other reason Patroni will automatically promote a sufficiently healthy standby to primary. Any transactions that have not been replicated to that standby remain in a &amp;ldquo;forked timeline&amp;rdquo; on the primary, and are effectively unrecoverable&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;</description></item><item><title>Community</title><link>https://pig.center/docs/pgbouncer/community/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/pgbouncer/community/</guid><description>&lt;hr&gt;&#10;&lt;h2 id="tutorials"&gt;Tutorials&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://get.enterprisedb.com/docs/Tutorial_All_PPSS_pgBouncer.pdf"&gt;How to Set Up PgBouncer for Postgres Plus Standard Server&lt;/a&gt;&#10;&lt;/p&gt;&#10;&lt;p&gt;Good overview of PgBouncer concepts.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="http://www.depesz.com/2012/12/02/what-is-the-point-of-bouncing/"&gt;What is the point of bouncing?&lt;/a&gt;&#10;&lt;/p&gt;&#10;&lt;p&gt;Discusses differences between pooling modes.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="support"&gt;Support&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://github.com/pgbouncer/pgbouncer"&gt;Project page&lt;/a&gt;&#10; at GitHub&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://github.com/pgbouncer/pgbouncer/issues"&gt;Issue tracker&lt;/a&gt;&#10; at GitHub&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/tagged/pgbouncer"&gt;PgBouncer section&lt;/a&gt;&#10; at Stack Overflow&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://github.com/pgbouncer/pgbouncer/discussions"&gt;Community discussions&lt;/a&gt;&#10; at GitHub&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Project Metrics</title><link>https://pig.center/docs/pgbackrest/metric/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/pgbackrest/metric/</guid><description>&lt;hr&gt;&#10;&lt;h2 id="code-coverage"&gt;Code Coverage&#10;&lt;/h2&gt;&#10;&lt;p&gt;pgBackRest aims to have complete function/branch/line coverage for the core C code in &lt;code&gt;/src&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;Function/line coverage is complete with no exceptions.&lt;/p&gt;&#10;&lt;p&gt;Branch coverage excludes branches inside macros and &lt;code&gt;assert()&lt;/code&gt; calls. Macros have their own unit tests so they do not need to be tested everywhere they appear. Asserts are not expected to have complete branch coverage since they test cases that should always be true.&lt;/p&gt;</description></item><item><title>Companion Products and Alternatives</title><link>https://pig.center/docs/haproxy/ecosystem/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/ecosystem/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;HAProxy integrates fairly well with certain products listed below, which is why they are mentioned&#10;here even if not directly related to HAProxy.&lt;/p&gt;&#10;&lt;h2 id="section-4-1"&gt;4.1. Apache HTTP server&#10;&lt;/h2&gt;&#10;&lt;p&gt;Apache is the de-facto standard HTTP server. It&amp;rsquo;s a very complete and modular project supporting&#10;both file serving and dynamic contents. It can serve as a frontend for some application servers. It&#10;can even proxy requests and cache responses. In all of these use cases, a front load balancer is&#10;commonly needed. Apache can work in various modes, some being heavier than others. Certain modules&#10;still require the heavier pre-forked model and will prevent Apache from scaling well with a high&#10;number of connections. In this case HAProxy can provide a tremendous help by enforcing the&#10;per-server connection limits to a safe value and will significantly speed up the server and preserve&#10;its resources that will be better used by the application.&lt;/p&gt;</description></item><item><title>Watchdog support</title><link>https://pig.center/docs/patroni/watchdog/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/watchdog/</guid><description>&lt;p&gt;&lt;a id="watchdog"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;Having multiple PostgreSQL servers running as primary can result in transactions lost due to diverging timelines. This situation is also called a split-brain problem. To avoid split-brain Patroni needs to ensure PostgreSQL will not accept any transaction commits after leader key expires in the DCS. Under normal circumstances Patroni will try to achieve this by stopping PostgreSQL when leader lock update fails for any reason. However, this may fail to happen due to various reasons:&lt;/p&gt;</description></item><item><title>DCS Failsafe Mode</title><link>https://pig.center/docs/patroni/dcs_failsafe_mode/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/dcs_failsafe_mode/</guid><description>&lt;p&gt;&lt;a id="dcs_failsafe_mode"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="the-problem"&gt;The problem&#10;&lt;/h2&gt;&#10;&lt;p&gt;Patroni is heavily relying on Distributed Configuration Store (DCS) to solve the task of leader elections and detect network partitioning. That is, the node is allowed to run Postgres as the primary only if it can update the leader lock in DCS. In case the update of the leader lock fails, Postgres is immediately demoted and started as read-only. Depending on which DCS is used, the chances of hitting the &amp;ldquo;problem&amp;rdquo; differ. For example, with Etcd which is only used for Patroni, chances are close to zero, while with K8s API (backed by Etcd) it could be observed more frequently.&lt;/p&gt;</description></item><item><title>1. Quick Reminder About HTTP</title><link>https://pig.center/docs/haproxy/http-fundamentals/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/http-fundamentals/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;This document covers the configuration language as implemented in the version specified above. It&#10;does not provide any hints, examples, or advice. For such documentation, please refer to the&#10;Reference Manual or the Architecture Manual. The numbered chapters are ordered in the flat HAProxy sidebar for direct navigation.&lt;/p&gt;&#10;&lt;p&gt;When HAProxy is running in HTTP mode, both the request and the response are fully analyzed and&#10;indexed, thus it becomes possible to build matching criteria on almost anything found in the&#10;contents.&lt;/p&gt;</description></item><item><title>Citus support</title><link>https://pig.center/docs/patroni/citus/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/citus/</guid><description>&lt;p&gt;&lt;a id="citus"&gt;&lt;/a&gt;&#10;Patroni makes it extremely simple to deploy &lt;a href="https://docs.citusdata.com/en/stable/installation/multi_node.html"&gt;Multi-Node Citus&lt;/a&gt;&#10; clusters.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="tldr"&gt;TL;DR&#10;&lt;/h2&gt;&#10;&lt;p&gt;There are only a few simple rules you need to follow:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;a href="https://github.com/citusdata/citus"&gt;Citus&lt;/a&gt;&#10; database extension to PostgreSQL must be available on all nodes. Absolute minimum supported Citus version is 10.0, but, to take all benefits from transparent switchovers and restarts of workers we recommend using at least Citus 11.2.&lt;/li&gt;&#10;&lt;li&gt;Cluster name (&lt;code&gt;scope&lt;/code&gt;) must be the same for all Citus nodes!&lt;/li&gt;&#10;&lt;li&gt;Superuser credentials must be the same on coordinator and all worker nodes, and &lt;code&gt;pg_hba.conf&lt;/code&gt; should allow superuser access between all nodes.&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/patroni/config/yaml/#restapi_settings"&gt;REST API&lt;/a&gt;&#10; access should be allowed from worker nodes to the coordinator. E.g., credentials should be the same and if configured, client certificates from worker nodes must be accepted by the coordinator.&lt;/li&gt;&#10;&lt;li&gt;Add the following section to the &lt;code&gt;patroni.yaml&lt;/code&gt;:&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-587d891b-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="yaml" data-td-line-count="3"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-587d891b-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;citus&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;X &lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# 0 for coordinator and 1, 2, 3, etc for workers&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;database&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;citus &lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# must be the same on all nodes&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;After that you just need to start Patroni and it will handle the rest:&lt;/p&gt;</description></item><item><title>Integration with other tools</title><link>https://pig.center/docs/patroni/tools_integration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/tools_integration/</guid><description>&lt;p&gt;&lt;a id="tools_integration"&gt;&lt;/a&gt;&#10;Patroni is able to integrate with other tools in your stack. In this section you will find a list of examples, which although not an exhaustive list, might provide you with ideas on how Patroni can integrate with other tools.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="barman"&gt;Barman&#10;&lt;/h2&gt;&#10;&lt;p&gt;Patroni delivers an application named &lt;code&gt;patroni_barman&lt;/code&gt; which has logic to communicate with &lt;code&gt;pg-backup-api&lt;/code&gt;, so you are able to perform Barman operations remotely.&lt;/p&gt;&#10;&lt;p&gt;This application currently has a couple of sub-commands: &lt;code&gt;recover&lt;/code&gt; and &lt;code&gt;config-switch&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Security Considerations</title><link>https://pig.center/docs/patroni/security/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/security/</guid><description>&lt;p&gt;&lt;a id="security"&gt;&lt;/a&gt;&#10;A Patroni cluster has two interfaces to be protected from unauthorized access: the distributed configuration storage (DCS) and the Patroni REST API.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="protecting-dcs"&gt;Protecting DCS&#10;&lt;/h2&gt;&#10;&lt;p&gt;Patroni and &lt;a href="https://pig.center/docs/patroni/patronictl/#patronictl"&gt;patronictl&lt;/a&gt;&#10; both store and retrieve data to/from the DCS.&lt;/p&gt;&#10;&lt;p&gt;Despite DCS doesn&amp;rsquo;t contain any sensitive information, it allows changing some of Patroni/Postgres configuration. Therefore the very first thing that should be protected is DCS itself.&lt;/p&gt;&#10;&lt;p&gt;The details of protection depend on the type of DCS used. The authentication and encryption parameters (tokens/basic-auth/client certificates) for the supported types of DCS are covered in &lt;a href="https://pig.center/docs/patroni/config/yaml/#yaml"&gt;settings&lt;/a&gt;&#10;.&lt;/p&gt;</description></item><item><title>HA multi datacenter</title><link>https://pig.center/docs/patroni/ha_multi_dc/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/ha_multi_dc/</guid><description>&lt;p&gt;&lt;a id="ha_multi_dc"&gt;&lt;/a&gt;&#10;The high availability of a PostgreSQL cluster deployed in multiple data centers is based on replication, which can be synchronous or asynchronous (see &lt;a href="https://pig.center/docs/patroni/replication_modes/#replication_modes"&gt;replication modes&lt;/a&gt;&#10;).&lt;/p&gt;&#10;&lt;p&gt;In both cases, it is important to be clear about the following concepts:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Postgres can run as primary or standby leader only when it owns the leading key and can update the leading key.&lt;/li&gt;&#10;&lt;li&gt;You should run the odd number of etcd, ZooKeeper or Consul nodes: 3 or 5!&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="synchronous-replication"&gt;Synchronous Replication&#10;&lt;/h2&gt;&#10;&lt;p&gt;To have a multi DC cluster that can automatically tolerate a zone drop, a minimum of 3 is required.&lt;/p&gt;</description></item><item><title>2. HAProxy Architecture</title><link>https://pig.center/docs/haproxy/management-architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/haproxy/management-architecture/</guid><description>&lt;!-- Generated by scripts/generate-haproxy-docs.py from pinned upstream text. --&gt;&#10;&lt;p&gt;HAProxy is a multi-threaded, event-driven, non-blocking daemon. This means it uses event&#10;multiplexing to schedule all of its activities instead of relying on the system to schedule between&#10;multiple activities. Most of the time it runs as a single process, so the output of &amp;ldquo;ps aux&amp;rdquo; on a&#10;system will report only one &amp;ldquo;haproxy&amp;rdquo; process, unless a soft reload is in progress and an older&#10;process is finishing its job in parallel to the new one. It is thus always easy to trace its&#10;activity using the strace utility. In order to scale with the number of available processors, by&#10;default haproxy will start one worker thread per processor it is allowed to run on. Unless&#10;explicitly configured differently, the incoming traffic is spread over all these threads, all&#10;running the same event loop. A great care is taken to limit inter-thread dependencies to the strict&#10;minimum, so as to try to achieve near-linear scalability. This has some impacts such as the fact&#10;that a given connection is served by a single thread. Thus in order to use all available processing&#10;capacity, it is needed to have at least as many connections as there are threads, which is almost&#10;always granted.&lt;/p&gt;</description></item><item><title>Internals</title><link>https://pig.center/docs/etcd/dev-internal/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/dev-internal/</guid><description>&lt;!-- Local OINK section index for the upstream dev-internal document group. --&gt;</description></item><item><title>Learning</title><link>https://pig.center/docs/etcd/learning/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/learning/</guid><description/></item><item><title>Data model</title><link>https://pig.center/docs/etcd/learning/data_model/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/learning/data_model/</guid><description>&lt;p&gt;etcd is designed to reliably store infrequently updated data and provide reliable watch queries. etcd exposes previous versions of key-value pairs to support inexpensive snapshots and watch history events (“time travel queries”). A persistent, multi-version, concurrency-control data model is a good fit for these use cases.&lt;/p&gt;&#10;&lt;p&gt;etcd stores data in a multiversion &lt;a href="https://en.wikipedia.org/wiki/Persistent_data_structure"&gt;persistent&lt;/a&gt;&#10; key-value store. The persistent key-value store preserves the previous version of a key-value pair when its value is superseded with new data. The key-value store is effectively immutable; its operations do not update the structure in-place, but instead always generate a new updated structure. All past versions of keys are still accessible and watchable after modification. To prevent the data store from growing indefinitely over time and from maintaining old versions, the store may be compacted to shed the oldest versions of superseded data.&lt;/p&gt;</description></item><item><title>etcd client design</title><link>https://pig.center/docs/etcd/learning/design-client/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/learning/design-client/</guid><description>&lt;h1 id="etcd-client-design"&gt;etcd Client Design&#10;&lt;/h1&gt;&#10;&lt;p&gt;&lt;em&gt;Gyuho Lee (github.com/gyuho, Amazon Web Services, Inc.), Joe Betz (github.com/jpbetz, Google Inc.)&lt;/em&gt;&lt;/p&gt;&#10;&lt;h1 id="introduction"&gt;Introduction&#10;&lt;/h1&gt;&#10;&lt;p&gt;etcd server has proven its robustness with years of failure injection testing. Most complex application logic is already handled by etcd server and its data stores (e.g. cluster membership is transparent to clients, with Raft-layer forwarding proposals to leader). Although server components are correct, its composition with client requires a different set of intricate protocols to guarantee its correctness and high availability under faulty conditions. Ideally, etcd server provides one logical cluster view of many physical machines, and client implements automatic failover between replicas. This documents client architectural decisions and its implementation details.&lt;/p&gt;</description></item><item><title>etcd learner design</title><link>https://pig.center/docs/etcd/learning/design-learner/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/learning/design-learner/</guid><description>&lt;h1 id="etcd-learner"&gt;etcd Learner&#10;&lt;/h1&gt;&#10;&lt;p&gt;&lt;em&gt;Gyuho Lee (github.com/gyuho, Amazon Web Services, Inc.), Joe Betz (github.com/jpbetz, Google Inc.)&lt;/em&gt;&lt;/p&gt;&#10;&lt;h1 id="background"&gt;Background&#10;&lt;/h1&gt;&#10;&lt;p&gt;Membership reconfiguration has been one of the biggest operational challenges. Let’s review common challenges.&lt;/p&gt;&#10;&lt;h3 id="1-new-cluster-member-overloads-leader"&gt;1. New Cluster member overloads Leader&#10;&lt;/h3&gt;&#10;&lt;p&gt;A newly joined etcd member starts with no data, thus demanding more updates from leader until it catches up with leader’s logs. Then leader’s network is more likely to be overloaded, blocking or dropping leader heartbeats to followers. In such case, a follower may election-timeout to start a new leader election. That is, a cluster with a new member is more vulnerable to leader election. Both leader election and the subsequent update propagation to the new member are prone to causing periods of cluster unavailability (see &lt;em&gt;Figure 1&lt;/em&gt;).&lt;/p&gt;</description></item><item><title>etcd v3 authentication design</title><link>https://pig.center/docs/etcd/learning/design-auth-v3/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/learning/design-auth-v3/</guid><description>&lt;h2 id="why-not-reuse-the-v2-auth-system"&gt;Why not reuse the v2 auth system?&#10;&lt;/h2&gt;&#10;&lt;p&gt;The v3 protocol uses gRPC as its transport instead of a RESTful interface like v2. This new protocol provides an opportunity to iterate on and improve the v2 design. For example, v3 auth has connection based authentication, rather than v2&amp;rsquo;s slower per-request authentication. Additionally, v2 auth&amp;rsquo;s semantics tend to be unwieldy in practice with respect to reasoning about consistency, which will be described in the next sections. For v3, there is a well-defined description and implementation of the authentication mechanism which fixes the deficiencies in the v2 auth system.&lt;/p&gt;</description></item><item><title>etcd API</title><link>https://pig.center/docs/etcd/learning/api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/learning/api/</guid><description>&lt;p&gt;This document is meant to give an overview of the v3 etcd APIs central design.&#10;This should not be mistaken with etcd v2 API, deprecated in etcd v3.5.&#10;It is by no means all encompassing, but intended to focus on the basic ideas needed to understand etcd without the distraction of less common API calls.&#10;All etcd APIs are defined in &lt;a href="https://github.com/etcd-io/etcd/blob/main/api/etcdserverpb/rpc.proto"&gt;gRPC services&lt;/a&gt;&#10;, which categorize remote procedure calls (RPCs) understood by the etcd server.&#10;A full listing of all etcd RPCs are documented in markdown in the &lt;a href="https://pig.center/docs/etcd/dev-guide/api_reference_v3/"&gt;gRPC API listing&lt;/a&gt;&#10;.&lt;/p&gt;</description></item><item><title>etcd persistent storage files</title><link>https://pig.center/docs/etcd/learning/persistent-storage-files/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/learning/persistent-storage-files/</guid><description>&lt;p&gt;This document explains the etcd persistent storage format: naming, content and tools that allow developers to inspect them. Going forward the document should be extended with changes to the storage model. This document is targeted at etcd developers to help with their data recovery needs.&lt;/p&gt;&#10;&lt;h2 id="prerequisites"&gt;Prerequisites&#10;&lt;/h2&gt;&#10;&lt;p&gt;The following articles provide helpful background information for this document:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/learning/data_model/"&gt;etcd data model overview&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://raft.github.io/raft.pdf"&gt;Raft overview&lt;/a&gt;&#10; (especially &amp;ldquo;5.3 Log replication&amp;rdquo; section).&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="overview"&gt;Overview&#10;&lt;/h2&gt;&#10;&lt;h3 id="long-leaving-files"&gt;Long leaving files&#10;&lt;/h3&gt;&#10;&lt;table&gt;&#10; &lt;tr&gt;&#10; &lt;th&gt;File name&lt;/th&gt;&#10; &lt;th&gt;High level purpose&lt;/th&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;&lt;pre&gt;./member/snap/db&lt;/pre&gt;&lt;/td&gt;&#10; &lt;td&gt;&lt;strong&gt;bbolt &lt;a href="https://en.wikipedia.org/wiki/B%2B_tree"&gt;b+tree&lt;/a&gt;&lt;/strong&gt; that stores all the applied data, membership authorization information &amp; metadata. It’s aware of what's the last applied WAL log index (&lt;a href="https://github.com/etcd-io/etcd/blob/a1ff0d5373335665b3e5f4cb22a538ac63757cb6/server/etcdserver/cindex/cindex.go#L92"&gt;"consistent_index"&lt;/a&gt;).&#10; &lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;&lt;pre&gt;./member/snap/0000000000000002-0000000000049425.snap&#10;./member/snap/0000000000000002-0000000000061ace.snap&lt;/pre&gt;&#10; &lt;/td&gt;&#10; &lt;td&gt;&#10; &lt;p&gt;&#10; Periodic &lt;strong&gt;snapshots of legacy v2 store&lt;/strong&gt;, containing:&#10; &lt;ul&gt;&#10; &lt;li&gt;basic membership information&lt;/li&gt;&#10; &lt;li&gt;etcd-version&lt;/li&gt;&#10; &lt;/ul&gt;&#10; &lt;/p&gt;</description></item><item><title>etcd API guarantees</title><link>https://pig.center/docs/etcd/learning/api_guarantees/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/learning/api_guarantees/</guid><description>&lt;p&gt;etcd is a consistent and durable key value store.&#10;The key value store is exposed through &lt;a href="https://pig.center/docs/etcd/learning/api/#grpc-services"&gt;gRPC Services&lt;/a&gt;&#10;.&#10;etcd ensures the strongest consistency and durability guarantees for a distributed system.&#10;This specification enumerates the API guarantees made by etcd.&lt;/p&gt;&#10;&lt;h3 id="apis-to-consider"&gt;APIs to consider&#10;&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;KV APIs&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/learning/api/#range"&gt;Range&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/learning/api/#rangestream"&gt;RangeStream&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/learning/api/#put"&gt;Put&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/learning/api/#delete-range"&gt;Delete&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/learning/api/#transaction"&gt;Transaction&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;Watch APIs&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/learning/api/#watch-api"&gt;Watch&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;Lease APIs&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/learning/api/#obtaining-leases"&gt;Grant&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;[Revoke]&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/etcd/learning/api/#keep-alives"&gt;Keep alive&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;KV API allows for direct reading and manipulation of key value store.&#10;Watch API allows subscribing to key value store changes.&#10;Lease API allows assigning a time to live to a key.&lt;/p&gt;</description></item><item><title>etcd versus other key-value stores</title><link>https://pig.center/docs/etcd/learning/why/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/learning/why/</guid><description>&lt;p&gt;The name &amp;ldquo;etcd&amp;rdquo; originated from two ideas, the unix &amp;ldquo;/etc&amp;rdquo; folder and &amp;ldquo;d&amp;quot;istributed systems. The &amp;ldquo;/etc&amp;rdquo; folder is a place to store configuration data for a single system whereas etcd stores configuration information for large scale distributed systems. Hence, a &amp;ldquo;d&amp;quot;istributed &amp;ldquo;/etc&amp;rdquo; is &amp;ldquo;etcd&amp;rdquo;.&lt;/p&gt;&#10;&lt;p&gt;etcd is designed as a general substrate for large scale distributed systems. These are systems that will never tolerate split-brain operation and are willing to sacrifice availability to achieve this end. etcd stores metadata in a consistent and fault-tolerant way. An etcd cluster is meant to provide key-value storage with best of class stability, reliability, scalability and performance.&lt;/p&gt;</description></item><item><title>Why gRPC gateway</title><link>https://pig.center/docs/etcd/dev-guide/api_grpc_gateway/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/dev-guide/api_grpc_gateway/</guid><description>&lt;p&gt;etcd v3 uses &lt;a href="https://www.grpc.io/"&gt;gRPC&lt;/a&gt;&#10; for its messaging protocol. The etcd project includes a gRPC-based &lt;a href="https://github.com/etcd-io/etcd/tree/main/client/v3"&gt;Go client&lt;/a&gt;&#10; and a command line utility, &lt;a href="https://github.com/etcd-io/etcd/tree/main/etcdctl"&gt;etcdctl&lt;/a&gt;&#10;, for communicating with an etcd cluster through gRPC. For languages with no gRPC support, etcd provides a JSON &lt;a href="https://github.com/grpc-ecosystem/grpc-gateway"&gt;gRPC gateway&lt;/a&gt;&#10;. This gateway serves a RESTful proxy that translates HTTP/JSON requests into gRPC messages.&lt;/p&gt;&#10;&lt;h2 id="using-grpc-gateway"&gt;Using gRPC gateway&#10;&lt;/h2&gt;&#10;&lt;p&gt;The gateway accepts a &lt;a href="https://developers.google.com/protocol-buffers/docs/proto3#json"&gt;JSON mapping&lt;/a&gt;&#10; for etcd&amp;rsquo;s &lt;a href="https://pig.center/docs/etcd/dev-guide/api_reference_v3/"&gt;protocol buffer&lt;/a&gt;&#10; message definitions. Note that &lt;code&gt;key&lt;/code&gt; and &lt;code&gt;value&lt;/code&gt; fields are defined as byte arrays and therefore must be base64 encoded in JSON. The following examples use &lt;code&gt;curl&lt;/code&gt;, but any HTTP/JSON client should work all the same.&lt;/p&gt;</description></item><item><title>Failure modes</title><link>https://pig.center/docs/etcd/op-guide/failures/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/failures/</guid><description>&lt;p&gt;Failures are common in a large deployment of machines. A machine fails when its hardware or software malfunctions. Multiple machines fail together when there are power failures or network issues. Multiple kinds of failures can also happen at once; it is almost impossible to enumerate all possible failure cases.&lt;/p&gt;&#10;&lt;p&gt;In this section, we catalog kinds of failures and discuss how etcd is designed to tolerate these failures. Most users, if not all, can map a particular failure into one kind of failure. To prepare for rare or &lt;a href="https://pig.center/docs/etcd/op-guide/recovery/"&gt;unrecoverable failures&lt;/a&gt;&#10;, always &lt;a href="https://pig.center/docs/etcd/op-guide/maintenance/#snapshot-backup"&gt;back up&lt;/a&gt;&#10; the etcd cluster.&lt;/p&gt;</description></item><item><title>Performance</title><link>https://pig.center/docs/etcd/op-guide/performance/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/performance/</guid><description>&lt;h2 id="understanding-performance"&gt;Understanding performance&#10;&lt;/h2&gt;&#10;&lt;p&gt;etcd provides stable, sustained high performance. Two factors define performance: latency and throughput. Latency is the time taken to complete an operation. Throughput is the total operations completed within some time period. Usually average latency increases as the overall throughput increases when etcd accepts concurrent client requests. In common cloud environments, like a standard &lt;code&gt;n-4&lt;/code&gt; on Google Compute Engine (GCE) or a comparable machine type on AWS, a three member etcd cluster finishes a request in less than one millisecond under light load, and can complete more than 30,000 requests per second under heavy load.&lt;/p&gt;</description></item><item><title>Design of runtime reconfiguration</title><link>https://pig.center/docs/etcd/op-guide/runtime-reconf-design/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/runtime-reconf-design/</guid><description>&lt;p&gt;Runtime reconfiguration is one of the hardest and most error prone features in a distributed system, especially in a consensus based system like etcd.&lt;/p&gt;&#10;&lt;p&gt;Read on to learn about the design of etcd&amp;rsquo;s runtime reconfiguration commands and how we tackled these problems.&lt;/p&gt;&#10;&lt;h2 id="two-phase-config-changes-keep-the-cluster-safe"&gt;Two phase config changes keep the cluster safe&#10;&lt;/h2&gt;&#10;&lt;p&gt;In etcd, every runtime reconfiguration has to go through &lt;a href="https://pig.center/docs/etcd/op-guide/runtime-configuration/#add-a-new-member"&gt;two phases&lt;/a&gt;&#10; for safety reasons. For example, to add a member, first inform the cluster of the new configuration and then start the new member.&lt;/p&gt;</description></item><item><title>Versioning</title><link>https://pig.center/docs/etcd/op-guide/versioning/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/etcd/op-guide/versioning/</guid><description>&lt;p&gt;This document describes the versions supported by the etcd project.&lt;/p&gt;&#10;&lt;h2 id="service-versioning-and-supported-versions"&gt;Service versioning and supported versions&#10;&lt;/h2&gt;&#10;&lt;p&gt;etcd versions are expressed as &lt;strong&gt;x.y.z&lt;/strong&gt;, where &lt;strong&gt;x&lt;/strong&gt; is the major version, &lt;strong&gt;y&lt;/strong&gt; is the minor version, and &lt;strong&gt;z&lt;/strong&gt; is the patch version, following &lt;a href="https://semver.org/"&gt;Semantic Versioning&lt;/a&gt;&#10; terminology.&#10;New minor versions may add additional features to the API.&lt;/p&gt;&#10;&lt;p&gt;The etcd project maintains release branches for the current version and previous release. For example, when v3.5 is the current version, v3.4 is supported. When v3.6 is released, v3.4 goes out of support.&lt;/p&gt;</description></item></channel></rss>