Multiserver - Spread Traffic. Localhost restriction
Multiserver - Spread Traffic. Localhost restriction
am 13.11.2007 10:47:36 von Paul_Merck
Hi,
Ever suffer from too-much traffic ?
Point is, if the traffic increases, then the server is slow.
TOP command on a Linux/Unix/Fedora Apache/2.0.50 shows :
- 50% of the CPU : for HTTPD process
- 20% of the CPU : for Analog Process
- 20% of the CPU : for MYSQLD Process
The direct analysis would pretend that HTTPD is the problem. BUT may
be HTTPD is waiting for MYSQLD answer.
We have problem to analyse the sources of the lack of performance.
1) Idea ONE was to split sub.domains within other servers with
independant databases merged and consolidated into a single one using
exchange of tables.
2) Idea TWO was to have MYSQL hosted on one server and sub.domains
split over different servers.
SERVER1 : MYSQL
SERVER2 : oaks.bobby.com
SERVER3 : liveoaks.bobby.com
SERVER4 : bobby.com
We know ebay is ebay.com and these administrators might split over
servers depending on variables that our team does not manage.
3) We tried to go with Idea TWO and we are facing a problem.
Creating a user on SERVER1
Name : bobbob
Data Privilege : SELECT
INSERT
UPDATE
DELETE
FILE
Information related to connections
Server : % (all servers)
FLUSH PRIVILEGES ;
Then, on SERVER2 :
$host = "207.36.16.15";
$user = "bobbob";
$pass = "bobbob";
$bdd = "adv_database";
?>
It does not work : Cannot access the database on SERVER1 from SERVER2.
Even, we tried to add specfic provileges to bobbob.
Many Thanks for any operational answer from your knowledge and
background experience.
..Bob
Re: Multiserver - Spread Traffic. Localhost restriction
am 13.11.2007 11:02:16 von Captain Paralytic
On 13 Nov, 09:47, "2401 members, members can post"
wrote:
> Hi,
>
> Ever suffer from too-much traffic ?
>
> Point is, if the traffic increases, then the server is slow.
>
> TOP command on a Linux/Unix/Fedora Apache/2.0.50 shows :
> - 50% of the CPU : for HTTPD process
> - 20% of the CPU : for Analog Process
> - 20% of the CPU : for MYSQLD Process
>
> The direct analysis would pretend that HTTPD is the problem. BUT may
> be HTTPD is waiting for MYSQLD answer.
> We have problem to analyse the sources of the lack of performance.
>
> 1) Idea ONE was to split sub.domains within other servers with
> independant databases merged and consolidated into a single one using
> exchange of tables.
>
> 2) Idea TWO was to have MYSQL hosted on one server and sub.domains
> split over different servers.
>
> SERVER1 : MYSQL
> SERVER2 : oaks.bobby.com
> SERVER3 : liveoaks.bobby.com
> SERVER4 : bobby.com
>
> We know ebay is ebay.com and these administrators might split over
> servers depending on variables that our team does not manage.
>
> 3) We tried to go with Idea TWO and we are facing a problem.
>
> Creating a user on SERVER1
> Name : bobbob
> Data Privilege : SELECT
> INSERT
> UPDATE
> DELETE
> FILE
>
> Information related to connections
> Server : % (all servers)
>
> FLUSH PRIVILEGES ;
>
> Then, on SERVER2 :
>
>
> $host = "207.36.16.15";
> $user = "bobbob";
> $pass = "bobbob";
> $bdd = "adv_database";
> ?>
>
> It does not work : Cannot access the database on SERVER1 from SERVER2.
> Even, we tried to add specfic provileges to bobbob.
>
> Many Thanks for any operational answer from your knowledge and
> background experience.
>
> .Bob
Do not multi-post. Cross-post if you must but don't multi post It
wastes people's time.
http://www.blakjak.demon.co.uk/mul_crss.htm.
Re: Multiserver - Spread Traffic. Localhost restriction
am 13.11.2007 17:12:49 von colin.mckinnon
On 13 Nov, 09:47, "2401 members, SOME members can EVEN post"
wrote:
>
> Ever suffer from too-much traffic ?
>
> Point is, if the traffic increases, then the server is slow.
>
> TOP command on a Linux/Unix/Fedora Apache/2.0.50 shows :
> - 50% of the CPU : for HTTPD process
> - 20% of the CPU : for Analog Process
> - 20% of the CPU : for MYSQLD Process
>
> The direct analysis would pretend that HTTPD is the problem. BUT may
> be HTTPD is waiting for MYSQLD answer.
> We have problem to analyse the sources of the lack of performance.
>
> 1) Idea ONE was to split sub.domains within other servers with
> independant databases merged and consolidated into a single one using
> exchange of tables.
>
> 2) Idea TWO was to have MYSQL hosted on one server and sub.domains
> split over different servers.
>
> SERVER1 : MYSQL
> SERVER2 : oaks.bobby.com
> SERVER3 : liveoaks.bobby.com
> SERVER4 : bobby.com
>
> We know ebay is ebay.com and these administrators might split over
> servers depending on variables that our team does not manage.
>
> 3) We tried to go with Idea TWO and we are facing a problem.
>
> Creating a user on SERVER1
> Name : bobbob
> Data Privilege : SELECT
> INSERT
> UPDATE
> DELETE
> FILE
>
> Information related to connections
> Server : % (all servers)
>
> FLUSH PRIVILEGES ;
>
> Then, on SERVER2 :
>
>
> $host = "207.36.16.15";
> $user = "bobbob";
> $pass = "bobbob";
> $bdd = "adv_database";
> ?>
>
> It does not work : Cannot access the database on SERVER1 from SERVER2.
> Even, we tried to add specfic provileges to bobbob.
>
> Many Thanks for any operational answer from your knowledge and
> background experience.
>
> .Bob
Cutting away all the crud from your post - you don't seem able to
connect to mysql from a remote host. This is a well documented and
very FAQ - try google.
Apache and PHP are quite goos at not using up CPU when waiting for
resources - making the DB go faster isn't going to reduce the amount
of CPU time used by Apache (actually it will increase v. slightly if
you move the DB off the localhost).
Moving sub-domains onto specific servers is probably the dumbest way
to solve this problem - once you've googled how to connect to a remote
mysql database, lookup 'Round Robin DNS' and 'PHP session handler
MySQL'; you want to split the load across multiple, identically
configured webservers then you get the benefit of fault tolerance too.
How you replicate the files is up to you.
C.
Re: Multiserver - Spread Traffic. Localhost restriction
am 13.11.2007 18:43:42 von Jerry Stuckle
C. (http://symcbean.blogspot.com/) wrote:
> On 13 Nov, 09:47, "2401 members, SOME members can EVEN post"
> wrote:
>> Ever suffer from too-much traffic ?
>>
>> Point is, if the traffic increases, then the server is slow.
>>
>> TOP command on a Linux/Unix/Fedora Apache/2.0.50 shows :
>> - 50% of the CPU : for HTTPD process
>> - 20% of the CPU : for Analog Process
>> - 20% of the CPU : for MYSQLD Process
>>
>> The direct analysis would pretend that HTTPD is the problem. BUT may
>> be HTTPD is waiting for MYSQLD answer.
>> We have problem to analyse the sources of the lack of performance.
>>
>> 1) Idea ONE was to split sub.domains within other servers with
>> independant databases merged and consolidated into a single one using
>> exchange of tables.
>>
>> 2) Idea TWO was to have MYSQL hosted on one server and sub.domains
>> split over different servers.
>>
>> SERVER1 : MYSQL
>> SERVER2 : oaks.bobby.com
>> SERVER3 : liveoaks.bobby.com
>> SERVER4 : bobby.com
>>
>> We know ebay is ebay.com and these administrators might split over
>> servers depending on variables that our team does not manage.
>>
>> 3) We tried to go with Idea TWO and we are facing a problem.
>>
>> Creating a user on SERVER1
>> Name : bobbob
>> Data Privilege : SELECT
>> INSERT
>> UPDATE
>> DELETE
>> FILE
>>
>> Information related to connections
>> Server : % (all servers)
>>
>> FLUSH PRIVILEGES ;
>>
>> Then, on SERVER2 :
>>
>>
>> $host = "207.36.16.15";
>> $user = "bobbob";
>> $pass = "bobbob";
>> $bdd = "adv_database";
>> ?>
>>
>> It does not work : Cannot access the database on SERVER1 from SERVER2.
>> Even, we tried to add specfic provileges to bobbob.
>>
>> Many Thanks for any operational answer from your knowledge and
>> background experience.
>>
>> .Bob
>
> Cutting away all the crud from your post - you don't seem able to
> connect to mysql from a remote host. This is a well documented and
> very FAQ - try google.
>
> Apache and PHP are quite goos at not using up CPU when waiting for
> resources - making the DB go faster isn't going to reduce the amount
> of CPU time used by Apache (actually it will increase v. slightly if
> you move the DB off the localhost).
>
True, but even they get overloaded at times, on busy sites. And moving
the database off the site will increase the time it takes to get the
data from MySQL to the application due to network delays, if the current
server is resource bound, this could easily decrease the total time it
takes to perform MySQL operations.
> Moving sub-domains onto specific servers is probably the dumbest way
> to solve this problem - once you've googled how to connect to a remote
> mysql database, lookup 'Round Robin DNS' and 'PHP session handler
> MySQL'; you want to split the load across multiple, identically
> configured webservers then you get the benefit of fault tolerance too.
> How you replicate the files is up to you.
>
> C.
>
>
Not at all. It's quite a good way to split traffic, especially if the
subdomains have similar amounts of traffic. While using round-robin
DNS, etc. is more reliable, it also adds another layer of complexity
which may not be needed. And implementing and maintaining such a
solution is not a minor job.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================