Hacker Newsnew | past | comments | ask | show | jobs | submit | x4m's commentslogin

Just use https://github.com/yandex/odyssey :) It's a scalable PgBouncer.


We started with the most battle-tested and native option to Postgres, which is PgBouncer and tried tuning it the right way. Also now that long due kinks like support for prepared statements are solved, it’s been working really well. There are many customers scaling well with 10K+ Postgres connections. We will consider other options like odyssey, pgdog in the future!

Side note: I’m not a big fan of having 10K+ connections on Postgres, 100s are more than enough to scale Postgres well. But that’s a story for another day. ;)


With Odyssey we have customers with 50k+ connections operating normally.

Also consider SQPR - it's a connection pooler with sharding capabilities. It handles data migration between shard on top of request routing. Odyssey will inherit this capability once it is stable enough in functions set.


> 100s are more than enough to scale Postgres well

I'd want to know what the workload is. That's true of lots of projects, especially internal tools (even for multinationals). But for my last project, that would have been tough. And by FAANG standards my last project was 'medium' sized, even though it was large by the standards of many places I've worked.

(The galling thing is I shrunk the hardware by 40% but if I'd been there during the architecture phase I'm pretty sure I could have shrunk it by 8x by solving a completely different problem that had higher margins than what we actually did)


Fun (semi-related) fact, ClickHouse was originally developed by Yandex :)


is there a reason to still pick PgBouncer over these newer ones? Or is PgBouncer mostly the default because everybody runs it


As Odyssey maintainer, I have to admit that it is exceptionally difficult to achieve stability (e.i. quality) of PgBouncer.

It has two limitations: it is single threaded and it is developed only re-actively. PgBouncer docs used to say that prepared statements can never be supported, in 2022 we supported it in Odyssey and then PgBouncer implemented it too.

In a sense Odyssey is developed to motivate PgBouncer development. To provide alternatives that keep PgBouncer from stagnation.

Yet, I can't say that scalability with SO_REUSEPORT is a good solution.


I have choose pgbouncer for my small db, because it does one thing and does it good - transaction pooling, other solutions seemed too complicated for me. All that features which should keep you allow to use listen/notify and set was unnecessary for me, i solved it on code level


yandex is a russian company, so no, don't use it


I have bad news for you about where ClickHouse comes from then.


Do you boycott American companies too? I'm assuming you boycott Russian companies because Russia causes death and destruction. But the USA caused much more death and destruction than Russia ever did - do you boycott them too?


[flagged]


Objectively speaking, Russia is one of the most creative and innovative societies of all time. Literature, science, music, sporting, mathematics, computing, you name it, a Russian has innovated in it.


What would be some of these innovations and contributions in the last 20 years?


nginx (2004, ok, 22 years), ClickHouse (2016)


I don't get the "its from [country] so I don't use it". Unless this is somehow funding e.g. a war, what did the maintainers do to deserve such backlash?

Edit: just read what ties ClickHouse has, nevermind.


But in this case you would be supporting one of the good things (science & technology) they've done, right? A database connection pooler is not necessarily military technology.


Believe what you do, it's more useful for war-mongering nation states when you see things in so black and white manner.


except for perhaps… a scalable pg bouncer? And good nuclear reactors [1]?

Not to say I support many Russian political moves, but I think discrediting an entire people and their outputs on Russian politics is brusque - particularly open source ones.

[1]: https://www.abc.net.au/news/2026-05-08/russia-nuclear-power-...


Neither pg bouncer nor nuclear reactors are unique inventions in and of themselves - these are just iterations on what has existed previously. Of course russia can take an existing thing and iterate on it (computers, rockets, AK-47, etc.) but that wasn't my point.


Was a flight to space an iteration?


uhhhh


nginx is also Russian, so don't use... a third of the web.


nginx was built by one person. I'm talking about a russian corporation that has (inescapable) ties to kremlin


Yandex actually split up because of disagreement with the Russian governement and the war.

Check out Nebius


If open source code can have political beliefs then the only reasonable solution is to live as a hermit.

I can guarantee that there is software on your computer written by communists, nazis, mormons, every single political ideology is represented by lines of code that you run every day, because open source doesn't require any political vetting to contribute.


There are probably even Mormons who post on HN...


Again, there's a difference between software written by a person that represents a 'bad' (to me) ideology, and software written by corporations in terrorist states.


thank you for the advice mr mcarthy, i'll happily use deepseek and GLM to vibe my next project.


I'd love to! But MySQL is developed inside Oracle, and OCA somewhat scares me. Perhaps, I'll give a try to MariaDB or other forks.


And there's also https://postgrespro.com/docs/enterprise/current/multimaster With a history behind it.


Right, I'm not so familiar with it but from that page:

> The replication mechanism is based on logical decoding and an earlier version of the pglogical extension provided for community by the 2ndQuadrant team.


I think this should run just fine, why not? As long as you have proper Postgres operator, such proxy will run normally on top of that.


Interested in contributing/co-writing such a runbook for StackGres? [1]

[1]: https://stackgres.io/doc/latest/runbooks/


+1

there's already well maintained extension https://github.com/fboulnois/pg_uuidv7

It's slightly different from recommendations by draft RFC version (there's no counter), but fully within spec requirements. From practical point there's no difference at all.


FWIW Steam Deck runs 8k transactions per second if you build Postgres there. A nice place to work on open source development, actually. https://twitter.com/x4mmmmmm/status/1620984546216017921


Nice, now I can write off a Steam Deck as a business expense!


> Reduce the memory usage of prepared queries

FWIW Odyssey supports prepared statements in transaction pooling.


I concur that Odyssey docs are insufficient to build a big picture. But I'm trying to answer every question in the Internets about Odyssey :) Documenting is hard - everything seems obvious to me, but understand that may things are not that obvious. // Odyssey maintainer


I think the book is free because Egor and PostgresPro want to develop the community. If you want to pay back - you can just start contributing to Postgres. No need to wait :)


You are running on up to date version which seems to have no known critical bugs.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: