Use mysql-proxy for WBO table sharding?



Cloud Services
Server: Sync
6 years ago
3 years ago


(Reporter: rfkelly, Unassigned)


Firefox Tracking Flags

(Not tracked)




6 years ago
If we go ahead with Bug 799293 and introduce mysql-proxy into our stack, it opens up some possibilities to offload more work out of the webapp and into the proxy.

Currently the webapp has code to handle sharding of WBO storage into separate tables within a single database.  So one user might have their WBOs stored in table "wbo0" while another has them stored in table "wbo7".

Having this done in the webapp works fine, but it complicates and uglifies the code.  It gives third-party deployments yet another thing to think about, when in reality no-one will ever need this functionality but us.

What if we offloaded this logic into mysql-proxy?  The webapp would then just issue a query like "SELECT * FROM wbo WHERE userid = 123".  The proxy would extract the userid and transparently re-write the query to reference table "wbo5" instead of just "wbo".

The benefit here would be cleaner, simpler application code.  The downside would be another moving part, and potentially a performance hit if the mysql-proxy query-rewriting functionality is not performant enough.

Comment 1

3 years ago
We moved away from this idea, closing down the bug
Last Resolved: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.