Google Answers Logo
View Question
 
Q: best fault proof / scalable / upgradable hosting sol. for us with own servers ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: best fault proof / scalable / upgradable hosting sol. for us with own servers
Category: Computers > Internet
Asked by: rod123456-ga
List Price: $75.00
Posted: 19 Feb 2005 06:58 PST
Expires: 21 Mar 2005 06:58 PST
Question ID: 477063
Hi:

We are a e-commerce site currently on 1 Dell server. We use
LinuxRedHat with the following perl libraries and mod_perl installed:

Apache::Session
CGI::Cookie
Class::Singleton
Compress::Zlib
Config::Properties (v0.41)
DBI
DBD::mysql
File::Basename
Frontier::RPC2
HTML::Template
IPC::ShareLite
Log::Dispatch
MIME::Lite
Mysql::Locker
SOAP::Lite
Storable
Time::Local
URI::Escape
XMLRPC::Lite
libwww

As we have a simple colo provider now here in the Netherlands we just
found at that our running system needs upgrading Linux, Perl and PhP
as the versions are old. However, our hoster says this will be
dificult and full of risks.

Solution would be to take a 2nd server, 1 for testing, 1 live server.
However, when things are completed we will be having 1 spare server
which will not be needed in case of emergency.

Another hoster is offering a loadbalancing solution so we could use
both servers at the same time but the loadbalancer does not copy all
the things from 1 server to another incl mysql databases and so on.

My questions are:

1) is there some sort of RAID solution between servers where 1 server
automatically syncs everything from one server to another incl.
databases and the Linux configuration?

2) can we in that configuration stop 1 server and use it for testing
purp. and when we do need to test anymore put it back into the
loadbalancer and that it syncs to the master

3) alternative, what would be the best way to set things up properly
so we have a scalable hosting solution and we can utilize all
resources all the time and still have a testing solution

4) do we need to ask our programmer to use less libraries as this
makes it easier to keep the server(s) up to date or is the fact the he
uses so many libraries and mod_perl no problem or should we say he
needs to program on standard configuarions.

thanks and best regards,
Rod.
Answer  
Subject: Re: best fault proof / scalable / upgradable hosting sol. for us with own servers
Answered By: wildeeo-ga on 20 Feb 2005 19:47 PST
Rated:5 out of 5 stars
 
Hi, Rod. Thanks for your question.

You cannot use a traditional RAID setup, since this would effective
combine the two computer's hard disks to make one, and only one
computer could use this hard disk at a time.

It is possible to sync the data between the two machines. The big
problem with this, however, is the databases. If the database on one
machine is updated, it cannot simply be copied over the one in the
second machine because this would destroy any changes that have been
made to the second machine's copy of the database, and the reverse is
also true.

However, it is possible - but a bit complex - to use two machines
simultaneously with their own copy of the same database, in such a way
as to allow you to take one down to carry out testing. To solve this
problem, you would need to implement something called multimaster
replication on your two servers. This allows changes to be made to
both databases and they will appear on the other server immediately.

You do not say what database you are using, so I have provided some
solutions for the most popular database systems, as well as a few that
should work no matter what database you use.


Some solutions include:

- PeerFS (www.radiantdata.com) will automatically sync any changes on
one machine to the other in real time. Programs on both machines will
have access to the data, and if one machine was taken down for testing
or maintenance, the other should continue regardless.

- If you are using PostgreSQL, the PGCluster program
(http://pgcluster.projects.postgresql.org/) may be of use, as it
allows the syncing of data across multiple databases in real-time.

- Another option for PostgreSQL is http://dbbalancer.sourceforge.net/,
although this code is alpha-quality.

- Setting up MySQL to mirror the data between the two servers. There
is a tutorial available at
http://dev.mysql.com/tech-resources/articles/mysql-cluster-for-two-servers.html,
but it does require a third server.

- Setting up a shared network filesystem which the database would be
stored on. One such option is drdb, available from
http://www.drbd.org/.

- The mirroring functionality required is built into Oracle.



Probably better solutions to having two servers mirroring each others content are:

- Use one server as a web server, serving HTTP traffic, and the other
as a database server.

This would allow you to make use of both servers at once, one for
serving requests for information from the database, the other for
serving requests from the web. This would eliminate any problems with
synchronising the databases, and is a fairly common way to use
multiple machines. However, if your database is not used much, this
may be a waste of resources.

You could use the secondary database server as a test server when
required by copying the database over to the primary server and using
that as both the database and web server while testing is happening,
and copy it back to the secondary server when testing is complete.

- Use both servers as web servers, but put the database on the most
powerful of the two machines.

This would send HTTP requests to both machines, but only the most
powerful of them would run the database. Under this setup, the load is
split, and if you need to take a server offline for testing, you
should be able to disconnect the pure webserver without affecting the
other server.


It's also worth mentioning that if you need another server just for
testing, it may be cheaper to rent one - this way you don't have to
buy an entirely new server simple to check everything works okay.


As to your last question, it shouldn't matter as long as the software
they write is compatible with both machines. Most software written for
older versions of a library will usually be compatible with a newer
version of that library. The best bet is probably to ask him to write
code that is compatible with both machines, and if a newer version of
a library is absolutely essential, it shouldn't be a huge undertaking
to upgrade one library on both machines.


I hope this helps. Please do not hesitate to request a clarification
if you have any questions.

--wildeeo

Request for Answer Clarification by rod123456-ga on 21 Feb 2005 00:19 PST
Thanks for your answer! That is very complete !

One little question: is it really that hard to upgrade Linux etc.
because mod_perl is compiled with the Linux version as our hoster says
or not? Is it better to go with the standard Linux packages?

Clarification of Answer by wildeeo-ga on 21 Feb 2005 10:29 PST
Hi,

It isn't too hard to upgrade packages on linux machines - usually a
command such as apt-get or rpm should do that hard work for you.
Having said that, it's probably a better idea to go with the packages
installed automatically if possible, as they are designed and tested
to work together. Upgrading Linux itself is more difficult, as it will
probably involve changing the kernel, which could cause problems and
will involve at least one reboot.

One thing to watch out for when upgrading mod_perl is that you may
have to upgrade your versions of perl and apache to ensure it works
correctly.

The biggest problem upgrading mod_perl will probably come if you
upgrade from mod_per 1.x to 2.x, since some changes will probably have
to be made to your scripts. There is more information on the changes
that need to be made available at
http://perl.apache.org/docs/2.0/user/porting/compat.html.
rod123456-ga rated this answer:5 out of 5 stars and gave an additional tip of: $50.00
Very helpful information. 1 st class. We are going to build up our new
hosting platform based on this information. Thank you very much!

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy