We currently create a new MySQL connection for every HTTP request that gunicorn serves. This setup is slow, especially since the 16.04 upgrade, where we that connection must now use TLS. This causes a significant increase in load on the database, and resulted in the need to rollback the upgrade last week.
Change gunicorn deployment to not pre-fork.
Decide whether we should keep the manual connection transaction isolation mode switching or strip it out.
Determine how long we should hold connections open.
Test and Load Test ()
: And the read replicas?
the prod replica is the same size as the prod primary rds.
16.04 AMI without connection pooling: ami-b4169da2
16.04 AMI with connection pooling: ami-9e2da688
There were some config related hiccups with the AMIs, but took care of them. Results show that we should be good to try 16.04 back on prod with connection pooling enabled.
Hasn't been deployed yet, but AC has been met (load testing, settings determination).