
{"id":7543,"date":"2025-04-02T13:15:36","date_gmt":"2025-04-02T13:15:36","guid":{"rendered":"https:\/\/test.opensource-db.in\/wp1\/?p=7543"},"modified":"2025-04-02T13:27:00","modified_gmt":"2025-04-02T13:27:00","slug":"step-by-step-guide-to-postgresql-ha-with-patroni-part-3","status":"publish","type":"post","link":"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/","title":{"rendered":"Step-by-Step Guide to PostgreSQL HA with Patroni: Part 3"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hello, fellow PostgreSQL enthusiasts! Welcome back to the final blog of the series &#8220;PostgreSQL HA with Patroni&#8221; . <br>In our <a href=\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-2\/\">previous<\/a> blog of the series, we covered the complete configuration of&nbsp;<code>Patroni<\/code>&nbsp;with&nbsp;<code>etcd<\/code>&nbsp;to set up a highly available PostgreSQL cluster. We started by configuring etcd on three servers, ensuring proper cluster formation and leader election. We then proceeded with Patroni installation and configuration, integrating it with etcd to manage automatic failover and replication. After setting up Patroni, we performed a quick test by creating a table on the leader node and verifying replication across replicas. Finally, we simulated a failover scenario, demonstrating how Patroni automatically promotes a replica to leader status when the primary node goes down. The process also highlighted how the failed leader seamlessly rejoins the cluster once it recovers.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a quick recap and summary of previous blogs of the series.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-i\/\">1st Blog<\/a> : The first blog is all about the PostgreSQL High Availabilty architecture built on top of opensource tools Patroni , etcd, HAProxy and PgBouncer.Here we&#8217;ve discussed the importance of each tool, how to install them, and how these components work together.<\/li>\n\n\n\n<li><a href=\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-2\/\">2nd Blog<\/a> : In this post, we focused on configuring Patroni and etcd, and did a quick test of the configuration by creating a table. Also , we simulated the failover scenerio by stopping the current leader.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">In this blog post, we\u2019ll take it a step further by integrating <code>HAProxy<\/code> and <code>PgBouncer<\/code> with our Patroni cluster to enhance high availability, load balancing, and connection pooling.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why HAProxy and PgBouncer?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>HAproxy<\/strong>&nbsp;A high-performance load balancer used to route traffic between the primary and standby PostgreSQL instances. It ensures that database connections are always directed to the current primary, providing failover capabilities by switching connections to a new primary in the event of a failure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>PgBouncer<\/strong>&nbsp;A lightweight connection pooler for PostgreSQL that improves the performance of database connections by pooling and reusing database connections. It is particularly useful in environments with high connection churn and can be used with Patroni to optimize database connection management.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By combining <strong><em>Patroni<\/em><\/strong>, <strong><em>HAProxy<\/em><\/strong> and <strong><em>PgBouncer<\/em><\/strong>, we can achieve a robust, scalable, and highly available PostgreSQL cluster with seamless connection handling and failover capabilities. Installations were covered in Part 1 of this series , please do check it if you need any insights. If we observe the architecture in the first blog , we have PostgreSQL, Patroni, etcd and PgBouncer installed on 3 out of 5 servers. The remaining two servers will be dedicated to HaProxy. For Patroni and etcd configuration, click <a href=\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-2\/\">here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Configuration of PgBouncer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once we are done with the installations of the tools and configuration of Patroni and etcd, we will configure pgBouncer in the three servers.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#Configuration file for PgBouncer(pgbouncer.ini)\n&#91;databases]\n* = port=5432 auth_user=postgres\n&#91;pgbouncer]\nlogfile = \/pglog\/pgbouncer\/pgbouncer.log\npidfile = \/pghome\/pgbouncer\/pgbouncer.pid\nlisten_addr = 0.0.0.0\nlisten_port = 6432\nauth_type = md5\nauth_file = \/etc\/pgbouncer\/userlist.txt\nauth_query = SELECT usename, passwd FROM pg_shadow WHERE usename=$1\nadmin_users = postgres\nstats_users = postgres\npool_mode = session\nmax_client_conn = 100\ndefault_pool_size = 25\nreserve_pool_size = 5<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here, we are using pool_mode as session, but this setting needs to be configured depending on your application. The other settings will need to be configured based on your system configuration and workload. Make sure that you have userlist.txt updated. If you need more insights on PgBouncer, click <a href=\"https:\/\/test.opensource-db.in\/wp1\/connection-pooling-with-pgbouncer-a-primer\/\">here<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once the configuration is done, start the PgBouncer services.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl start pgbouncer\nsystemctl enable pgbouncer\nsystemctl status pgbouncer<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Configuration of HAProxy<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here is the configuration of HAProxy from our setup. Please adjust the settings based on your infrastructure and workload, and apply the HAProxy settings on the remaining 2 nodes.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#Configuration file for HAproxy (haproxy.cfg)\nglobal\n    maxconn     500\n    user haproxy\n    group haproxy\n    daemon\n\ndefaults\n    mode                    tcp\n    log                     global\n    option                  tcplog\n    retries                 3\n    timeout queue           1m\n    timeout connect         4s\n    timeout client          60m\n    timeout server          60m\n    timeout check           5s\n    maxconn                 500\n\nlisten stats\n    mode http\n    bind *:7000\n    stats enable\n    stats uri \/\n\nlisten primary\n    bind *:5000\n    option httpchk OPTIONS \/master\n    http-check expect status 200\n    default-server inter 3s fall 3 rise 2 on-marked-down shutdown-sessions\n    server server1 192.168.80.160:6432 maxconn 100 check port 8008\n    server server2 192.168.80.161:6432 maxconn 100 check port 8008\n    server server3 192.168.80.162:6432 maxconn 100 check port 8008\n\nlisten standby\n    bind *:5001\n    option httpchk OPTIONS \/replica\n    http-check expect status 200\n    default-server inter 3s fall 3 rise 2 on-marked-down shutdown-sessions\n    server server1 192.168.80.160:6432 maxconn 100 check port 8008\n    server server2 192.168.80.161:6432 maxconn 100 check port 8008\n    server server3 192.168.80.162:6432 maxconn 100 check port 8008<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here, we&#8217;ve configured HAProxy to manage load balancing by directing write operations to the primary node and read operations to the standby nodes. Once the configuration is done, start the haproxy services.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl start haproxy\nsystemctl enable haproxy\nsystemctl status haproxy<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, HAProxy will be handling connections to the PostgreSQL cluster, load balancing between the nodes. But If we require our application to remain available even in the event of a complete data center failure, we can configure <code>Keepalived<\/code> on top of HAProxy to provide high availability across multiple data centers. This ensures that if one data center goes down, traffic will automatically failover to the other data center, maintaining uninterrupted access to the application. <em>Let me know if there&#8217;s a need for a dedicated blog on <code>keepalived<\/code><\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do a quick test by executing some <code>insert<\/code> and <code>select<\/code> queries, and verify if they are being routed as per the configurations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this blog post, we\u2019ve successfully integrated <code>HAProxy<\/code> and <code>PgBouncer<\/code> into our <code>Patroni<\/code> &#8211; <code>PostgreSQL<\/code> cluster to enhance high availability, load balancing, and connection pooling. By adding these two powerful tools to our PostgreSQL setup, we\u2019ve created a more robust, scalable, and fault-tolerant system capable of handling high traffic and automatic failover scenarios with ease. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As we wrap up this series on PostgreSQL HA with Patroni, remember that setting up a highly available PostgreSQL cluster is a multi-faceted process involving careful configuration of various components. With our expertise, we ensure that your PostgreSQL environment is not only highly available but also optimized for peak performance and reliability. <a href=\"mailto:hello@opensource-db.com\">Get in touch<\/a>, and let us handle the complexities of database architecture so you can focus on driving your business forward with confidence and peace of mind. Happy clustering!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello, fellow PostgreSQL enthusiasts! Welcome back to the final blog of the series &#8220;PostgreSQL HA with Patroni&#8221; . In our [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":7548,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[52,1,65,23,42,89],"tags":[138,139,137,26],"class_list":["post-7543","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customer-success","category-others","category-pgbouncer","category-postgresql-14","category-postgresql-15","category-postgresql-16","tag-etcd","tag-haproxy","tag-patroni-2","tag-postgresql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Step-by-Step Guide to PostgreSQL HA with Patroni: Part 3 - OpenSource DB<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Step-by-Step Guide to PostgreSQL HA with Patroni: Part 3 - OpenSource DB\" \/>\n<meta property=\"og:description\" content=\"Hello, fellow PostgreSQL enthusiasts! Welcome back to the final blog of the series &#8220;PostgreSQL HA with Patroni&#8221; . In our [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/\" \/>\n<meta property=\"og:site_name\" content=\"OpenSource DB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-02T13:15:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-02T13:27:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"945\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Venkat Akhil\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@opensource_db\" \/>\n<meta name=\"twitter:site\" content=\"@opensource_db\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Venkat Akhil\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/\"},\"author\":{\"name\":\"Venkat Akhil\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/a37b142ecbf953189a4f9209b0b8d328\"},\"headline\":\"Step-by-Step Guide to PostgreSQL HA with Patroni: Part 3\",\"datePublished\":\"2025-04-02T13:15:36+00:00\",\"dateModified\":\"2025-04-02T13:27:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/\"},\"wordCount\":822,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png\",\"keywords\":[\"etcd\",\"HAProxy\",\"Patroni\",\"postgresql\"],\"articleSection\":[\"Customer Success\",\"Others\",\"PgBouncer\",\"PostgreSQL 14\",\"PostgreSQL 15\",\"PostgreSQL 16\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/\",\"name\":\"Step-by-Step Guide to PostgreSQL HA with Patroni: Part 3 - OpenSource DB\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png\",\"datePublished\":\"2025-04-02T13:15:36+00:00\",\"dateModified\":\"2025-04-02T13:27:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#primaryimage\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png\",\"contentUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png\",\"width\":1800,\"height\":945},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.opensource-db.in\/wp1\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Step-by-Step Guide to PostgreSQL HA with Patroni: Part 3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#website\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/\",\"name\":\"OpenSource DB\",\"description\":\"Your Trusted OpenSource Databases partner\",\"publisher\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/test.opensource-db.in\/wp1\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\",\"name\":\"OPENSOURCE DB PRIVATE LIMITED\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png\",\"contentUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png\",\"width\":368,\"height\":120,\"caption\":\"OPENSOURCE DB PRIVATE LIMITED\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/\",\"https:\/\/x.com\/opensource_db\",\"https:\/\/www.youtube.com\/channel\/UCmTI5h\",\"https:\/\/www.linkedin.com\/company\/opensource-db\",\"https:\/\/www.instagram.com\/opensource_db\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/a37b142ecbf953189a4f9209b0b8d328\",\"name\":\"Venkat Akhil\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/522c0947d21b2c2c89f10698fd9131f9db4110f65c8d02b53d9b4559c7650865?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/522c0947d21b2c2c89f10698fd9131f9db4110f65c8d02b53d9b4559c7650865?s=96&d=mm&r=g\",\"caption\":\"Venkat Akhil\"},\"url\":\"https:\/\/test.opensource-db.in\/wp1\/author\/sudheer-sopensource-db-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Step-by-Step Guide to PostgreSQL HA with Patroni: Part 3 - OpenSource DB","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Step-by-Step Guide to PostgreSQL HA with Patroni: Part 3 - OpenSource DB","og_description":"Hello, fellow PostgreSQL enthusiasts! Welcome back to the final blog of the series &#8220;PostgreSQL HA with Patroni&#8221; . In our [&hellip;]","og_url":"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/","og_site_name":"OpenSource DB","article_publisher":"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/","article_published_time":"2025-04-02T13:15:36+00:00","article_modified_time":"2025-04-02T13:27:00+00:00","og_image":[{"width":1800,"height":945,"url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png","type":"image\/png"}],"author":"Venkat Akhil","twitter_card":"summary_large_image","twitter_creator":"@opensource_db","twitter_site":"@opensource_db","twitter_misc":{"Written by":"Venkat Akhil","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#article","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/"},"author":{"name":"Venkat Akhil","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/a37b142ecbf953189a4f9209b0b8d328"},"headline":"Step-by-Step Guide to PostgreSQL HA with Patroni: Part 3","datePublished":"2025-04-02T13:15:36+00:00","dateModified":"2025-04-02T13:27:00+00:00","mainEntityOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/"},"wordCount":822,"commentCount":0,"publisher":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#organization"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png","keywords":["etcd","HAProxy","Patroni","postgresql"],"articleSection":["Customer Success","Others","PgBouncer","PostgreSQL 14","PostgreSQL 15","PostgreSQL 16"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/","url":"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/","name":"Step-by-Step Guide to PostgreSQL HA with Patroni: Part 3 - OpenSource DB","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#website"},"primaryImageOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#primaryimage"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png","datePublished":"2025-04-02T13:15:36+00:00","dateModified":"2025-04-02T13:27:00+00:00","breadcrumb":{"@id":"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#primaryimage","url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png","contentUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png","width":1800,"height":945},{"@type":"BreadcrumbList","@id":"https:\/\/test.opensource-db.in\/wp1\/step-by-step-guide-to-postgresql-ha-with-patroni-part-3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.opensource-db.in\/wp1\/"},{"@type":"ListItem","position":2,"name":"Step-by-Step Guide to PostgreSQL HA with Patroni: Part 3"}]},{"@type":"WebSite","@id":"https:\/\/test.opensource-db.in\/wp1\/#website","url":"https:\/\/test.opensource-db.in\/wp1\/","name":"OpenSource DB","description":"Your Trusted OpenSource Databases partner","publisher":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/test.opensource-db.in\/wp1\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/test.opensource-db.in\/wp1\/#organization","name":"OPENSOURCE DB PRIVATE LIMITED","url":"https:\/\/test.opensource-db.in\/wp1\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/","url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png","contentUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png","width":368,"height":120,"caption":"OPENSOURCE DB PRIVATE LIMITED"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/","https:\/\/x.com\/opensource_db","https:\/\/www.youtube.com\/channel\/UCmTI5h","https:\/\/www.linkedin.com\/company\/opensource-db","https:\/\/www.instagram.com\/opensource_db\/"]},{"@type":"Person","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/a37b142ecbf953189a4f9209b0b8d328","name":"Venkat Akhil","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/522c0947d21b2c2c89f10698fd9131f9db4110f65c8d02b53d9b4559c7650865?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/522c0947d21b2c2c89f10698fd9131f9db4110f65c8d02b53d9b4559c7650865?s=96&d=mm&r=g","caption":"Venkat Akhil"},"url":"https:\/\/test.opensource-db.in\/wp1\/author\/sudheer-sopensource-db-com\/"}]}},"rttpg_featured_image_url":{"full":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png",1800,945,false],"landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png",1800,945,false],"portraits":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png",1800,945,false],"thumbnail":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20-150x150.png",150,150,true],"medium":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20-300x158.png",300,158,true],"large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20-1024x538.png",1024,538,true],"1536x1536":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20-1536x806.png",1536,806,true],"2048x2048":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png",1800,945,false],"ultp_layout_landscape_large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png",1200,630,false],"ultp_layout_landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png",870,457,false],"ultp_layout_portrait":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png",600,315,false],"ultp_layout_square":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/04\/image-20.png",600,315,false]},"rttpg_author":{"display_name":"Venkat Akhil","author_link":"https:\/\/test.opensource-db.in\/wp1\/author\/sudheer-sopensource-db-com\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/business\/customer-success\/\" rel=\"category tag\">Customer Success<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/business\/others\/\" rel=\"category tag\">Others<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/extensions\/pgbouncer\/\" rel=\"category tag\">PgBouncer<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-14\/\" rel=\"category tag\">PostgreSQL 14<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-15\/\" rel=\"category tag\">PostgreSQL 15<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-16\/\" rel=\"category tag\">PostgreSQL 16<\/a>","rttpg_excerpt":"Hello, fellow PostgreSQL enthusiasts! Welcome back to the final blog of the series &#8220;PostgreSQL HA with Patroni&#8221; . In our [&hellip;]","_links":{"self":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/7543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/comments?post=7543"}],"version-history":[{"count":4,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/7543\/revisions"}],"predecessor-version":[{"id":7550,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/7543\/revisions\/7550"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media\/7548"}],"wp:attachment":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media?parent=7543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/categories?post=7543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/tags?post=7543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}