News for hackers. Stuff that matters.
Re:Alpine Linux 3.7.0 Released by the_duke on Friday December 01, 2017 @12:45PM (#15825640)
A) If you are opening 10000 new db connections per second you are doing something very wrong. Use connection pooling! Psycopg2 actually has one built in. (http://initd.org/psycopg/docs/pool.html)

B) If DNS actually becomes a legitimate bottleneck, you can just manually resolve the domain name and cache it. If the db sits behind a load balancer or does DNS round robing you can keep the cache time low and re-resolve on connection failures.

Re:Alpine Linux 3.7.0 Released by brianwawok on Friday December 01, 2017 @01:35PM (#15826045)
a) No they are persistent. I set the timeout to be something like 600 seconds. They are wanting to do a DNS query every time they are used for ???reasons????.

b) I think dnsmasq is a better answer. My DNS is already load balanced in k8s, but that is getting hit pretty hard.