SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL master slave loadbalancing, how to choose?

    I'm looking to set up a master/slave DB layout for my PHP application. My problem is, how will the PHP application know which DB server to choose to do its reads or writes? Is it just done via round-robin, or is there some way to help select the database with the least load?

  2. #2
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you use normal replication all writes will need to be to the master server, so that MySQL can replicate to the slaves.

    As for reading you could probably create a round-robin system, or perhaps assign certain users to a given server as part of their profile info.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm looking for some way to do VIP (virtual IP) round robin allocations. Any recommendations on what to you? I'm thinking LVS?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •