Posted on March 17th, 2008 by Masood
MySQL provides cluserting but not fail over for end user. So here at JaguarPC Web Hosting labs we tested MySQL fail over cluserting. To setup MySQL clustering a minimum of 3 computers are required. However recommended number is 4 or more. And to setup a failover mysql cluster, we add one more machine making it 5. There are 3 parts in a MySQL Cluster:
Data: 2 or more nodes act as data. In MySQL 5.0, the data sits in memory, while in 5.1 data can go on disk as well (5.1 is release candidate). For our testing we use 2 data nodes. When one of the node dies, the other will serve the data.
Management: One machine is used for cluster management. Once the cluster is started and this machine goes down, the cluster can continue to work. So this is not critical for our fail over setup.
SQL:: 2 test machines were setup as SQL nodes in failover with a single “floating IP”. When one died, the “floating IP” moved to the second machine using arp spoofing. MySQL client would connect to SQL node using that floating IP, so for the client MySQL Server remains up and running when one of the SQL nodes die. This part of the setup is JaguarPC’s own making and is available through Dedicated Server Hosting offer.
The rough diagram for this whole setup is as follows:
MySQL client -> [ 2 SQL nodes fail-over ] -> [ 2 data nodes ]
RAM Requirement for Data Node: Since MySQL 5.0 uses RAM to hold the data in data nodes, you can use the following formula for obtaining a rough estimate of how much RAM is needed for each data node in the cluster:
(SizeofDatabase × NumberOfReplicas × 1.1 ) / NumberOfDataNodes
Say our database size is 10 GB, and we make 2 replicas and host it on 4 nodes, then we need about 6GB RAM in each node. If we store our 10GB with 2 replicas in 6 nodes, then we need 4GB RAM in each node. You get the idea.
More will be posted later about this topic.
Filed under Linux Hosting, Site Management | No Comments »
Posted on March 14th, 2008 by Masood
My website was working for years on the old host but now it does not work on new host. Why? This is one of annoyances that come up because some people fail to realize that there are just too many variables at function here. For a website to operate, there are many building blocks, e.g. Web Server, Scripting Language, Database. And not only that, there are zillions of verions of these tools. If your site code was designed in the last century, it is possible that it will not work in the 21st century. No wait, if it was designed last year with the tool that was developed 5 years ago, it may not work today. Confused?
A static website that is composed of HTML/css/js is served by a web server as it is to the browser which renders and displays it to the client. However if your site is dynamic and is coded in a certain language (e.g. php or perl) that code has to run on the server to make web pages. That code may be written in a certain version of langauge which may be a mismatch between your old host and new host (or your old server and new server). As a responsible website owner you should be aware of what are the pre-requisites of your site code. Not only that, you need to regularly update the code to newest version of tools and make it compatible with them. If your site code has not changed since years, chances are that you are risking your entire hosting account and site, as many bugs that were unknown before may have been released in public. And those known exploits can used by script kiddies to hack your site remotely.
In short, a website owner needs to keep his code upto-date so that (1) it works on newest technologies and server tools (2) it is not open for remote exploits and abuse.
As a starting point, for a Linux Shared Hosting, you should be aware that PHP4 is phasing out and PHP5 is the future. MySQL4 database is also being replaced with MySQL5. So you need to learn how to update the code or get in touch with the developer/vendor of your web application to make it compatible.
Filed under Site Management | No Comments »
Posted on March 11th, 2008 by Masood
Roundcube is a webmail interface which uses ajax extensively to give it a “desktop” like feel. According to a recent post on cPanel forums it is being internally tested for integrating it into cPanel. This would be a good alternative to horde which has a history of problems, and squirrelmail which looks ugly to non-geeks.
Filed under Web hosting | 1 Comment »
Posted on March 9th, 2008 by Connie
In the wee hours of the morning the time changed again. Time changes twice a year, and the change is called “Day Light Savings” in the US. There are a few states in the US that are smart enough not to fool with the clock, but not many. I know Arizona is one. I think there are a couple more.
I think at least a few countries around the world also use “Day Light Savings Time”. Not sure who they all are but I’m fairly certain that Great Britain does.
Supposedly fooling with the clock saves money. Your not supposed to use as much energy during the months that DLS is in effect.
I have never figured that out. How is changing the clock by one hour going to save utility cost? In the spiring when we are on “Day Light Savings”, you get an extra hour of day light at the end of the day. You get an extra hour of darkness at the beginning of the day. Either way you are going to need your lights on for the same amount of time. The only difference is what time of day you have your lights on.
Personally I think the whole purpose of “Day Light Savings” is to give golfers more time to play golf at least in the US.
Filed under General | No Comments »