Overview of how Disqus uses Postgres at scale, some of the pain points we've encountered, and where we see the future of Postgres going in our use case.
where we DON’T we use it ๏ Stats and counters (Cassandra) ๏ Eventual consistency ๏ Availability ๏ Queue (RabbitMQ) ๏ Compatibility with existing libraries ๏ Availability
logical replication ๏ Love + Hate for Slony ๏ Killer feature: flexible replication sets ๏ Still running a patched 2.0.3 release ๏ Hate the lock-in & using 3rd party tool ๏ Tremendous risk associated with upgrade ๏ Unbelievably excited for BDR
connecting to postgres ๏ Lots of possibilities ๏ Connect directly to Postgres ๏ local pgBouncer - Postgres ๏ pgBouncer - pgBouncer - Postgres ๏ pgBouncer - HAProxy - Postgres ๏ HAProxy - pgBouncer - Postgres ๏ Zen of Python ๏ “There should be one-- and preferably only one --obvious way to do it.”
a parallel to nginx ๏ right tool for the job... ๏ ...isn’t always obvious ๏ nginx can be used for: ๏ streaming HTTP connections ๏ resizing images on the fly ๏ caching & transforming HTTP responses ๏ and more!
real extensions ๏ already a bunch of awesome extensions today ๏ PostGIS (huge di erentiator for PG) ๏ pg_repack ๏ pl/v8 ๏ hstore ๏ ... and others, but we can do better
“magical pony” extensions ๏ PL/Proxy-style query routing ๏ move partitioning logic into postgres ๏ query progress indicator ๏ helps set biz analyst expectations ๏ pg_autoscale ๏ tools a la Heroku for everyone ๏ INDEXED BY support in SQL