>>> Keep in mind, we run our production MySQL clusters with a pretty aggressive idle timeout (30s)
Number one source of connectivity issue with MySQL. That setting alone is the source to every bug they encountered.
It's marvelous the amount of applications that have a low timeout and wonder why the (idle) connections are dropped all the time.
The timeout works fantastic when software prepare connection to the database, spend maybe 30 seconds initializing and doing other stuff, then send the query. The carefully prepared connection is guaranteed to be broken consistently. But the most impressive use case is with connection pools, whose purpose is to maintain idle connections, that gets butchered every 30 seconds.
MySQL should remove this fatal setting and enable TCP keepalive by default.
At least have mercy on the developers to set a sane default and cap the minimum value to 5 minutes.
More worryingly, it looks like they just rewrote the authz functionality from ruby to golang, and have both the monolith and the microservice accessing the same database?
Agreed. This is fairly egregious misconfiguration.
But it's also unsafe from the Go client/ connection pool to expect idle sockets to stay open indefinitely -- any firewall or network appliance traversal would be highly likely to invalidate that.
Number one source of connectivity issue with MySQL. That setting alone is the source to every bug they encountered.
It's marvelous the amount of applications that have a low timeout and wonder why the (idle) connections are dropped all the time.
The timeout works fantastic when software prepare connection to the database, spend maybe 30 seconds initializing and doing other stuff, then send the query. The carefully prepared connection is guaranteed to be broken consistently. But the most impressive use case is with connection pools, whose purpose is to maintain idle connections, that gets butchered every 30 seconds.
MySQL should remove this fatal setting and enable TCP keepalive by default.
At least have mercy on the developers to set a sane default and cap the minimum value to 5 minutes.