Tuan Anh Pham (@since8x) header
Tuan Anh Pham (@since8x) profile picture

Technical Leader at VSI | DadOps

Hanoi, Vietnam
Joined March 2012
Photo by Tuan Anh Pham (@since8x)
Tuan Anh Pham retweeted
Postgres has a process-per-connection architecture. Therefore, you should use a connection pooler whenever possible. Connection poolers sit between the app and database. They maintain a pool of connections and dynamically map incoming requests to to them. PgBouncer is the most popular tool for the job, and operates in three modes. (1) Session pooling: maps each incoming connection directly to one of PgBouncer's pooled connections. (2) Transaction pooling: Each incoming txn is assigned a pooled connection, and relinquishes it when the txn is complete. (3) Statement pooling: Each individual statement maps to a pooled connection. Does not allow for multi-statement transactions. The most limiting mode! Option 1 does't solve the high-concurrency issues of Postgres, so is generally not recommended for high-connection-count scenarios. Option 3 is too limiting. Multi-statement transactions are important for many use-cases. Option 2 is the best balance of feature support + taming Postgres connections. Statement mode is what we use at PlanetScale for all our PgBouncer instances.
20
79
2
935
79,305
Awesome!
Meet GitHub Copilot - your AI pair programmer. copilot.github.com
1
Very nice, thank you!
This post is from an account that no longer exists. Learn more
Tuan Anh Pham retweeted
We are very happy to announce the release of Istio 1.5! WebAssembly, Istiod, and simplified deployments. Check it out. istio.io/news/releases/1.5.x…
97
12
169
How to convert YAML to JSON $ alias yaml2js="python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin, Loader=yaml.FullLoader), sys.stdout, indent=4)'" #bash #alias
Buildkit that awesome 😊😊😊 @Docker
Using envsubst is awesome way to building docker image. #Docker #Dockerfile
Tuan Anh Pham retweeted
Good news. WireGuard has been merged into net-next and is on its way to be included in Linux kernel v5.6! git.kernel.org/pub/scm/linux… As soon as it becomes part of the official Linux kernel, I am dropping OpenVPN. What do you think?
8
46
1
190