PgBouncer at Scale: Lessons from 243 PostgreSQL DBs
Manage episode 497387792 series 3015412
Fwdays Tech Talks에서 제공하는 콘텐츠입니다. 에피소드, 그래픽, 팟캐스트 설명을 포함한 모든 팟캐스트 콘텐츠는 Fwdays Tech Talks 또는 해당 팟캐스트 플랫폼 파트너가 직접 업로드하고 제공합니다. 누군가가 귀하의 허락 없이 귀하의 저작물을 사용하고 있다고 생각되는 경우 여기에 설명된 절차를 따르실 수 있습니다 https://ko.player.fm/legal.
Welcome to the second episode of Architecture Deep Dive with Oleksii Petrov! In today’s podcast, our guest — Vitaliy Kharytonskiy, Solution Architect, Prom.ua. n this episode, Vitaliу from Prom.ua dives deep into the architecture behind one of Ukraine’s largest e-commerce platforms. He shares insights on managing 243 PostgreSQL databases, why they chose self-hosted infrastructure, and how they scale with PgBouncer. Tune in for a detailed look at connection pooling, Kubernetes, and production lessons learned. Link to Vitalii’s presentation: "Spin-up pgbouncer for fun and profit" 🔗 https://fwdays.com/en/event/devops-fwdays-2025/review/spin-up-pgbouncer-for-fun-and-profit What you should subscribe to: – More interesting content for developers: https://fwdays.com/en/events – Fwdays Twitter: https://twitter.com/fwdays – Oleksii Petrov's Telegram channel: https://t.me/OleksiiTheArchitect – Oleksii Petrov's LinkedIn: https://www.linkedin.com/in/alexhelkar/ Timestamps: 00:00 - Intro 01:14 - Vitalii’s role at Prom.ua and introduction to Prom.ua platform 04:00 - What's the scale of prom.ua? How many databases do you have? 05:48 - Why did you choose self-hosted infrastructure over cloud? 08:19 - What's your typical PostgreSQL deployment configuration? 09:35 - What's the driver for having 243 PostgreSQL Databases? Is it Microservices/SOA concerns? 11:11 - Is it possible to run such an infrastructure without PgBouncer? 12:48 - Why do we need a database proxy and what's PostgreSQL's connection model? 17:54 - What are the three pooling modes of PgBouncer? 19:40 - Do we have any limitations in Transaction Pool Mode? 21:35 - Why not just use application-level pooling? 24:15 - How do you prevent PgBouncer connection starvation across services? 25:27 - Do you use PgBouncer's built-in authentication and why? 26:09 - What are the trade-offs of PGBouncer being single-threaded? 27:17 - Architecture evolution journey from Basic to Kubernetes 29:44 - Walkthough the current PostgresSQL and PGBouncer architecture at Prom.ua. 33:15 - Did you consider using PgBouncer as both an app-level and reverse proxy to the database? 34:08 - How do you structure your PgBouncer pod when using sidecar containers? 39:09 - What is the health check strategy for PgBouncer? 40:38 - What’s the best way to work with the clients_waiting metric in PgBouncer? 42:12 - Do you have autoscaling setup for PgBouncer? 43:05 - What are the key metrics to monitor for PgBouncer? 44:36 - Why use a custom DNS layer instead of relying on cloud DNS? 47:35 - Is built-in health checks implementation planned in PgBouncer? 48:30 - Do you see any development or evolution in the PgBouncer project? 49:12 - What PgBouncer log do you parse and why? 50:20 - How do you debug issues with PgBouncer? 51:23 - Can you share any stories about production incidents with PgBouncer? 52:08 - How do you handle PgBouncer Config Reloads Without Restarts? 52:45 - Final Thoughts & Advice from Vitaliy 53:57 - Don’t forget to subscribe and like!
…
continue reading
86 에피소드