Live data from Hacker News

We scaled PgBouncer to 4x throughput

clickhouse.com

21–30 of 67 posts

Re: We scaled PgBouncer to 4x throughput

#23
> The cancel lands on a process that has never heard of the query, and nothing happens.

> Peering fixes this. The processes are aware of one another, so a cancel that lands on the wrong process is forwarded to the one that actually owns the session.

I understand "peering" as a concept here but have never tried this with PostgreSQL before. May I ask:

A) Does PostgreSQL have a mode/setting for peering that makes this easy? I'm imagining a mechanism that either goes round robin (re-sending the cancel to peers until it doesn't return an error of some kind) or some metadata in the cancel request that enables the wrong-destination process to somehow identify the proper process.

B) And by what mechanism? If all the PostgreSQL processes are listening to clients via so_reuseport, I guess there must be some other IPC method used for the peering chatter.

Re: We scaled PgBouncer to 4x throughput

#25

> The cancel lands on a process that has never heard of the query, and nothing happens. > Peering fixes this. The processes are aware of one another, so a cancel that lands on the wrong process is forwarded to the one that actually owns the session. I understand "peering" as a concept here but have never tried this with PostgreSQL before. May I ask: A) Does PostgreSQL have a mode/setting for peering that makes this e…

AI clearly wrote TFA. The cancellation thing is apparently a PgBouncer feature - the peering is between bouncer processes, not server processes. It sounds like it should be easy enough to make the bouncer process ID part of the cancel key.

Re: We scaled PgBouncer to 4x throughput

#26
post #6

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

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

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?

Re: We scaled PgBouncer to 4x throughput

#28
post #26

Earlier quoted context omitted.

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

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?

uhhhh

Re: We scaled PgBouncer to 4x throughput

#29
post #26

Earlier quoted context omitted.

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

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]

Re: We scaled PgBouncer to 4x throughput

#30

Earlier quoted context omitted.

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

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
Post reply on HN