2

I have a webserver in my application which talks to a single MySQL node. Instead of having just one MySQL node, I want to have a cluster of n nodes which form my database.

Is it possible to do this? Can some one point to a resource where I can read about how to do this.

I read about MySQL cluster but am more confused now; is there any beginner tutorial for that?

I don't want to rewrite the application, as I am under the impression that application code should never know whether it's talking to one DB node or a cluster of DB Nodes.

4
  • Are you looking for something like this? blog.ulf-wendel.de/2011/…
    – Bjoern
    Commented Aug 29, 2012 at 9:13
  • sorry but i haven't got a bit of it. My problem is i have a database and a table in it. Now this table is too huge, i just wnat to split it up and keep in say 4 different systems(nodes or computers). but when this database is accessed from my application it should work as though it is in one system. I hope i am clear.
    – Thebestshoot
    Commented Aug 29, 2012 at 9:26
  • So you want different records of a table on different servers? How are you expecting to code the searching of records?
    – BugFinder
    Commented Aug 29, 2012 at 9:40
  • yes it is what i am expecting.i don't think the application code should change anyway, the DB has to have some way to doing this.The application should just work as it was communicating to a single node. Commented Aug 30, 2012 at 5:00

3 Answers 3

2

This technique is called Sharding.

MySQL doesn't support this kind of partitioning therefore is necessary to implement sharding logic manually.

I think Spock Proxy, for example, it's a good starting point to think in this direction

Hope this helps

2

Clustrix, ScaleDB, etc., have solutions for $$$.

But wait... Do you really need Sharding? Or do you just need Replication, and have a load balancer in front of a few readonly Slaves?

Slaves solve read-scaling. Sharding solves write-scaling.

Replication is available out-of-the-box.

1
  • i am not in need of replication but i want both read and writes scaling. Commented Aug 30, 2012 at 4:51
0

UPDATE 2015 FROM MY PREVIOUS POST 2012 :)

You can take a look into MySQL Fabric (Official Doc)

I have tried this tool only in R&D env for testing a basic HA

It supports some sharding scenarios

Here some high level pros and cons

Pros:

  • setup
  • sharding
  • write/read
  • basic HA

Cons:

  • fabric node is the SPOF
  • no multi master
  • rewrite software in order to use the fabric driver

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.