Showing posts with label server installation. Show all posts
Showing posts with label server installation. Show all posts

What is Clustering and Load Balancing?

Clustering is often understood to mean the capability of some software to provide load balancing services, and load balancing is often used as a synonym for a hardware- or third-party-software-based solution.

In practice, clustering is usually used with application servers like IBM WebSphere, BEA WebLogic and Oracle AS (10g). Also being used in that environment are load balancing features found in Application Delivery Controllers (ADC) like BIG-IP. (For simplicity, we will talk about "clustering" versus "ADC" approaches.)

Scalability

There are hardware load balancers, of course, but there we talk about "pools" or "farms," the server groupings where application requests get distributed. It is in the software world that the term "cluster" is applied to that same group.

Clustering will typically convert one instance of an application server to a master controller, then process/distribute requests to multiple instances using such industry standard algorithms as round robin, weighted round robin or least connections. Clustering is similar to load balancing in that it has horizontal scalability, a nearly transparent way to add additional instances of application servers for increased capacity or response time performance. To ensure that an instance is actually available, clustering approaches typically use an ICMP ping check or, sometimes, HTTP or TCP connection checks.

Health and Transparency

For load balancing, ADCs support the same industry algorithms, but have additional, complex number-crunching processes, and check such parameters as per-server CPU and memory utilization, fastest response times, etc. ADCs also support more robust health monitoring than the simple app server clustering solutions. This means they can verify content and do passive monitoring, dispensing with even the low impact of health checks on app server instances.

For applications that require the user to interact with the same server during a session, clustering uses server affinity to get the user there. This is most common during the execution of a process like order entry, where the session is used between pages (requests) to store data needed to close a transaction, like a shopping cart.

For the same situation, ADCs use persistence. Clustering solutions are usually somewhat limited as to the variables they can use, while ADCs can not only use traditional application variables but also get other information from the application or network-based data.

More than a few clustering solutions need node-agents deployed on each instance of an application server that is "clustered" by a controller. It may not be a burden as far as deploying and managing it, since it is often in place, but it is still means more processes running on the servers and consuming memory and CPU resources. Of course, it also adds another possible failure point to the data path. Since ADCs need no server-side components, they remain completely transparent.

What is Cluster Hosting?

Having a web site is a necessity for the success of most businesses in today's technologically advanced society. However, just having a web site doesn't mean that it is going to get the public exposure needed to be successful. That is where web hosting comes into play. With web hosting you rent a place in a server and exposure to the internet. The pricing of web hosting can range anywhere from the bare minimum for free to the most advanced for a varied prices depending on the web hosting company and the type of web hosting you decide to go with.

One type of web hosting that works toward getting exposure to your web site, but is somewhat less common than other types of web hosting is Cluster Hosting. The configuration of cluster hosting tends to lean more toward more complex design, implementation and support. Networking of shared resources of computing, as well as varied implementations of those resources comprises a cluster. It is often referred to as a server farm since is consists of a group of independent servers. However, the group functions together toward a common goal.

If a company experiences an IT system failure, there can be a lot of money lost while the website is down. This is where cluster hosting comes into play. When connected directly to a single server, if failure occurs the user cannot reconnect; whereas with a cluster the user can immediately reconnect and keep going with what they were doing. If one server of a cluster host would happen to fail, there is an automatic backup.

A complex cluster can take data and split it into manageable sections that independent servers can then process. In this way if a single server should fail there is no affect to the others. There are a couple of different kinds of cluster configurations in cluster hosting as well. These include an active/passive cluster and active/active cluster. The active/passive situation involves a passive server being idle until the case where the active server fails. If the active server fails, the passive server then takes over where the other one left off. In the configuration of active/active the whole group of servers can be active and be backup servers to each other. Each server can take on the role of the others in this type of cluster configuration.

No matter the type of web hosting you choose, you should be sure that the web hosting company you choose clearly defines every aspect of their services and the services that are available to you and your company specifically. You should be very careful in your selection of a cluster hosting company. With cluster hosting there is the need to ensure that the web hosting company can provide you with an adequate number of cluster servers to handle the level of traffic your web site will experience. The success or failure of your company infrastructure depends on your choice in a web host.

The main reason for choosing cluster web hosting is be sure that there is a redundancy available in the computer network. This ensures that the network is always available and will not fail. In turn the company's website is always accessible and navigable.

How to Install Nagios on Ubuntu Server?

You want features? Nagios is full of them. Nagios can monitor your entire network, you can handle problem remediation, you can plan network downtime, you can watch hosts, systems, services, applications..there’s very little you can’t do with Nagios.

But let’s think about this installation. The best way to install Nagios is from source. This means you are going to have to do some compliation. Don’t worry, it’s not hard…when you have a step-by-step guide that is.

Before you start

If you are using, as I did, a Ubuntu server installation, you will need to install a few tools first. So from the command line issue the following commands:

sudo apt-get install php5-gd

sudo apt-get install gcc

sudo apt-get install make

The above commands will install the tools you need in order to get Nagios installed. If you don’t install the above, you won’t be able to complete the installation.

Installing Nagios - preflight

Before you actually run the installation you will need to take care of some user/group accounting first.

Create the user nagios:

sudo useradd -m nagios

Give the nagios user a password:

sudo passwd nagios

NOTE: You will have to enter the new password twice for the above command.

Create the group nagios:
sudo groupadd nagios

Add the user nagios to the group nagios:

sudo usermod -G nagios nagios

Create the group nagcmd:

sudo groupadd nagcmd

Add the user nagios to the group nagcmd:

sudo usermod -a -G nagcmd nagios

Add the Apache user to the group nagcmd:

sudo usermod -a -G nagcmd www-data

Installing Nagios and Nagios Plugins

The first thing to do is to download the files you need. Issue the commands:

wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.0.6.tar.gz

and

wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-
plugins-1.4.11.tar.gz

to download the files you need.

Untar the Nagios file with:

tar xvzf nagios-3.0.6.tar.gz

Change into the newly created Nagios directory with the command:

cd nagios-3.0.6

Now run the configure script using the nagcmd defined as the command group with the command:

sudo ./configure –with-command-group=nagcmd

Time to compile:

sudo make all

Time to install everything:

make install

make install-init

make install-config

make install-commandmode

Almost ready to finalize the installation of Nagios (before moving on to installing the plugins.) There is one simple configuration to take care of (for the basic installation). Open up the /usr/local/nagios/etc/objects/contacts.cfg file and add your email address as the contact email address. That’s the only configuration to change for now.

Configuring for the Web interface

There are just a few commands to run to configure the Web interface:

make install-webconf

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

/etc/init.d/apache2 reload

The final command above simply restarts Apache.

Install the plugins

Before you log into your Nagios installation you have to install your plugins first. Change to the directory you downloaded the Nagios files to and untar the plugins file:

tar xvzf nagios-plugins-1.4.11.tar.gz

Now change into the newly created directory:

cd nagios-plugins-1.4.11

Compile the plugins with the command:

sudo ./configure –with-nagios-user=nagios –with-nagios-group=nagios

Now install the plugins with the following commands:

make

make install

Fire it up!

Of course you want to make sure Nagios starts any time the system is restarted. Do this with the command:

sudo ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios

And finally, before you start up Nagios, make sure there are no errors with the command:

sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

If you see no errors reported, it’s time to start it up. Issue the command:

sudo /etc/init.d/nagios start

Nagios is ready to go. Point your browser to:

http://ADDRESS_OF_NAGIOS_SERVER/nagios

Source: http://www.ghacks.net/2009/06/08/how-to-install-nagios-on-ubuntu-server/