Use connection pooling on edx-platform

Description

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.

Acceptance Criteria:

  • 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 ()

Steps to Reproduce

None

Current Behavior

None

Expected Behavior

None

Reason for Variance

None

Release Notes

None

User Impact Summary

None

Activity

Show:
David Ormsbee
April 12, 2017, 2:56 PM

: And the read replicas?

Feanil Patel
April 12, 2017, 7:42 PM

the prod replica is the same size as the prod primary rds.

Feanil Patel
April 13, 2017, 1:17 PM

16.04 AMI without connection pooling: ami-b4169da2
16.04 AMI with connection pooling: ami-9e2da688

David Ormsbee
April 22, 2017, 11:57 PM

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.

David Ormsbee
April 25, 2017, 1:35 PM

Hasn't been deployed yet, but AC has been met (load testing, settings determination).

Assignee

David Ormsbee

Reporter

David Ormsbee

Labels

Reach

None

Impact

None

Platform Area

None

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Category of Work

None

Platform Map Area (Levels 1 & 2)

None

Platform Map Area (Levels 3 & 4)

None

Story Points

5

Sprint

None

Priority

Unset
Configure