Distributed MySQL Via Web Services?

Imagine for a moment, if you will, making your MySQL queries via a REST API. Weird, huh? I’ll admit its a crazy idea, but then a lot of my ideas are crazy. Still. Work with me here.

Query –> || REST API ||

  1. The query is a select
  1. Rest API synchronously determines both which servers are up and which is the fastest to respond.
  2. The API connects to the server with your user name and password (specified in the request header)
  3. The query is run on that server, and the response is passed back through to you.
  4. Connection closed
  • The query is an Insert/Update/Delete
    1. Rest API synchronously determines both which servers are up and which is the fastest to respond.
    2. The API verifies your credentials against that server, and gives you a Query ID
    1. You can then re-query the API with the Query ID to determine if the query has been fully replicated.
  • The API writes the query into replication directories, a la slurpd
  • The query is then passed along to all of the real MySQL servers
  • Plenty of details to iron out here, but it’s certainly feasible… And definitely interesting…

    3 thoughts on “Distributed MySQL Via Web Services?

    1. yes, very cool. I recall running into that a while back (back when it didn't matter much to me) I think that looks like a great tool, and *exactly* my thoughts on the front end (well minus the REST thing, but thats ok!)

      What I'm going for above is also a less centralized replication approach, though. Something you could set in a cloud and let the servers all arrange themselves in a distributed fashion…

      Hmm… something like lbpool and the black hole storage engine… Gosh… The only real thing left to do would be a distributed master…

      Have to think on that…

      Maybe using DNS names for the masters along with the blackhole engine… ooo… hmm…

    Leave a Reply