The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

db and http on different server?

Discussion in 'Database Discussions' started by joelin, Jun 30, 2007.

  1. joelin

    joelin Active Member

    Joined:
    Nov 7, 2006
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    hi,i am the user of cpanel with that i install the all the service( db and http ) on the same server,

    i want to ask if it is possible that i install them on different servers?

    for example http on serverA and db on serverB,

    if the website need db,it will have website on serverA and link the db on serverB,

    is it possible?

    if yes,i need 2 licenses for the two servers? or the serverA is only?


    thanks a lot. :)
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Yes, you can have your website on one server and DB on another. You just need to mention the DB connection correctly on ServerA so if someone access your site which needs db, it should connect the ServerB correctly.

    And no, you don't need cPanel license on DB server.
     
  3. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Washington Court House, Ohio, United States
    cPanel Access Level:
    DataCenter Provider
    mysql on a second server...

    You can change the MySQL server from the local server ("localhost") to point to a remote server. This allows MySQL functions to be performed by another computer.

    To set up a remote MySQL server:

    1. Click on the Setup Remote MySQL server link in the MySQL menu.

    2.Enter the name of the remote server in the Remote Mysql Host field and its password in the Remote Mysql Host's Root Password field.

    Note: Do not enter the root password for the remote MySQL server in the Remote Mysql Host's Root Password field.

    3.Click on the Setup button.


    Keep in mind you may experience issues w/ current sites pointing to localhost for their db server


    you may want to do some fancy port forwarding - or set localhost in dns to point elsewhere
     
  4. joelin

    joelin Active Member

    Joined:
    Nov 7, 2006
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    hi,thanks for all the info firstly. :)

    as you say,the db server do not need install cpanel,

    if in the way,when i create a account,the total space of http on serverA and db on serverB will be caculated together?or not?


    if i add another db serverC with version 4.1 and the serverB is mysql 4.0,
    can i let the website on serverA chose wich db server it want to use?
    or i can point which db server it will use when creating the account?

    thnaks a lot.
     
  5. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Washington Court House, Ohio, United States
    cPanel Access Level:
    DataCenter Provider

    doubtful about the calculation - would have to check - Perhaps someone else may know.

    Its 1 or the other - local or remote
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    With regards to quotas, currently databases are not counted towards a user's quota. This has much to do with the fact that currently the calculations of database disk usage (particularly with InnoDB) in the cPanel interface can become prone to inaccuracy. Our QA folks have discussed this previously on the forums and are working towards a solution so they can be included with a user's quota :).

    With regards to MySQL clustering, currently cPanel/WHM only supports 1 cPanel/WHM server to 1 database server, not multiple database servers.
     
  7. joelin

    joelin Active Member

    Joined:
    Nov 7, 2006
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Hi,cPanelDavidG,

    i have some questions,

    1.
    if the db does not been caculated in the cpanel,the value in cpanel will show with zero always?

    2.
    can many cpanel/whm servers with one db server?

    3.
    for the separating service,if i use the same server for using,

    (1)http and db on the same server,it can host 100 websites well.

    (2)if i separate the db and http on two server,the two hardwares are the same with the one in(1),
    will the performace of the separating more than 200 websites?

    thanks a lot.
     
  8. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Regarding quotas, a size will be displayed in the user's cPanel interface for database size but depending on the situation, it may not be accurate.

    When it comes to clustering for performance, it is very possible to have a performance DECREASE due to MySQL clustering if it is done incorrectly. On most web servers, database usage is relatively minimal not substantially reducing the performance of an overall server. I generally only recommend MySQL clustering in situations where resource usage for the database is beginning to overwhelm the server. In that scenario, it makes sense to move the database to a separate server.

    However, keep in mind that now that your database is on a remote server that every SQL query has to be sent to that server, and every result must be sent from that server. For this reason, it is typically recommended that the database server be housed in the same data facility as the web server to reduce network latency.

    Some individuals decide they will have their web server in one facility and their database server in another facility thousands of miles away, so if something happens to once facility, they can still continue operations. However, the network latency for data to be traveling thousands of miles through the Internet will create lag with relation to accessing the database. This is not a good idea if your site is database-intensive as it will slow to a crawl vs. simply having a local database server.

    With that said, do not expect doubling the number of servers you're using to double your performance or ability to host sites. Every website is different, some are static, some are dynamic but employ substantial caching to reduce database utilization and others are very database intensive. The solution you will need will depend on the websites you or your customers plan on hosting on your server. MySQL clustering is not something everyone will benefit from and in a typical web hosting setting, most individuals are better off keeping the database server on the same physical/virtual server as the web server.
     
Loading...

Share This Page