The MU forums have moved to WordPress.org

HyperDB and hostname lookup bottleneck (4 posts)

  1. orensol
    Member
    Posted 14 years ago #

    Hi WPMUers,

    Any of you using HyperDB plugin, and encountering clogs in hostname lookups?

    I am using it with something like:

    add_db_server('global', 0,'', 0, 1,     '',          'writer.mydomain.com',    'db_name',     'db_user',     'db_pass');
    add_db_server('global', 0,'', 1, 0,     '',          'reader1.mydomain.com',    'db_name',     'db_user',     'db_pass');

    And it seems that the functions using the db hostnames (fsockopen(), mysql_connect() etc.) are not caching the lookup response (I am using DNS and not the hosts file, and not using nscd).

    Therefore I have about 200 DNS requests per minute with low loads, and this the WPMU box can handle, but when loads peak the lookups hang (and all the WPMU with them!) for a couple of minutes until the load clears.

    Any input is appreciated.
    Thanks,
    Oren

  2. cafespain
    Member
    Posted 14 years ago #

    Have you tried using ip addresses? I link to my database servers using internal IP addresses, so the DNS and external network is never hit.

  3. orensol
    Member
    Posted 14 years ago #

    IP addresses are not optional in my case, since I am using DNS to determine what host is the active writer (it's on EC2, so I can't have an internal floating ip address).

  4. cafespain
    Member
    Posted 14 years ago #

    Looks like you are going to have to put some sort of DNS caching on the server then, but don't know how it's going to work if the IP address of your active writer is always changing.

About this Topic

  • Started 14 years ago by orensol
  • Latest reply from cafespain