Merge lp:~stub/launchpad/oauth-db into lp:launchpad
Status: | Rejected |
---|---|
Rejected by: | Stuart Bishop |
Proposed branch: | lp:~stub/launchpad/oauth-db |
Merge into: | lp:launchpad |
Diff against target: |
436 lines (+55/-169) 7 files modified
lib/canonical/launchpad/database/oauth.py (+44/-36) lib/canonical/launchpad/database/tests/test_oauth.py (+2/-8) lib/canonical/launchpad/doc/oauth.txt (+8/-26) lib/canonical/launchpad/interfaces/oauth.py (+1/-16) lib/canonical/launchpad/scripts/garbo.py (+0/-38) lib/canonical/launchpad/scripts/tests/test_garbo.py (+0/-41) lib/canonical/launchpad/zcml/oauth.zcml (+0/-4) |
To merge this branch: | bzr merge lp:~stub/launchpad/oauth-db |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Canonical Launchpad Engineering | Pending | ||
Review via email: mp+27025@code.launchpad.net |
Description of the change
The OAuthNonce table is our most heavily updated table by an order of magnitude and responsible for the majority of our replication load. It generally sits at 40 updates per second and spikes at over two hundred for short periods.
We maintain the nonce seen history per the OAuth spec to help prevent replay attacks. There is no need for this information to be stored in a relational database at all - it is overkill. Memcache seems a better storage mechanism.
If memory pressure causes memcached to prematurely evict nonce history, users will not notice - what we lose is the replay protection. Monitoring is being put in place so we will see when evictions start happening and we can add RAM to our memcached instances or investigate alternative storages.
Unmerged revisions
- 5592. By Stuart Bishop
-
Shorten keys
- 5591. By Stuart Bishop
-
Betterer expiry
- 5590. By Stuart Bishop
-
Better expiry to avoid memcached pressure
- 5589. By Stuart Bishop
-
Drop OAuthNonce DB class, replacing its use with memcached
- 5588. By Stuart Bishop
-
Log OAuthNonces in memcached rather than PostgreSQL
- 5587. By Stuart Bishop
-
Merge from lp:~launchpad-pqm/launchpad/devel