Saturday, June 2, 2012

Server Resources Provisioning

Any of the IT company may spend huge amount of money for IT infrastructure, majorly on servers. Its obvious that number of servers [cost] and keep everything up and running [availability] is a trade-off factor. More you distribute the services, higher the availability but lesser the ROI. If you host everything in one single server in order to minimize the cost, you may manifest the risk or danger only in case of a catastrophic. :) .In a nutshell, bundling everything into single host does not give you the ROI in long term. However there are some factors to consider to achieve maximum ROI when allocating resources.

1) Availability Requirement.
2) Redundancy requirement.
3) Ability to bundle into same server.
4) Service resources consumption.
5) Security Considearation.

Following I have taken small to medium software development company as a example

Availability Requirement.

Importance of the service is very critical factor to consider. As a example your corporate web-site or the customer support site need to be up and running 24X7 and its essentials to achieve five nines availability (99.999%). To achieve five nines you can only have down time of 5.26 minutes per year. Its kind of three time rebooting a server within the year.

So these kind of critical services need be isolate from all others. You should only be running these services on individual servers no matter how many resources available on the servers. Don't mix it with garbage. This may prevent you from happening.

i) Human nature of mistakes

If your critical system is running with no issue, Why should you put non critical service on the same server. If you are frequently log into a server or more you do modifications, there is a high probability to interrupt other services. Therefore you need to make-sure unless otherwise you have to you need to do a modification to the critical service you does not need to log into the server.

ii) It let you the opportunity to allocate maximum resources.

As an example if you have a 4Gb memory machine to run a tomcat instance, there is no reason to prevent you from allocating “-Xmx4096m” to the JVM, Increase the “memory_limit” of a PHP script or increase the “MaxClients” of apache . Simple as that.

Redundancy requirement.

Redundancy to achieve high availability but replications need extra servers. But you need to make sure redundant servers are selected from different physical locations/ data centers/ ISPs.

If the replication is Hot standby, but replication server serves only and only if primary is down, then the Master node need to consider as most importance and treat as per the availability requirement factor. But you may use the slave nodes with conjunction with other services as if slave servers till master up and running. However if the setup is balancing and fail-over scenario you need to treat both nodes equally important.

Ability to bundle into same server.

Bundling or hosting more then one service ideal specially for Staging//testing setups. Also non critical service can be bundle into same server. However you need to further look at to mitigate potential vulnerabilities. As a example its not good idea to host your SFTP/FTP server even its jailed with Apache/SSL enabled server. In case of SFTP vulnerability exploitation you may loose your certifications files, or private keys.

Secondarily depending on the usage/ resource requirement you can limit the memory allocation for each services. Or process cores can be limit through virtualization. But process intensive services like build servers, SVN need to be separate as both need significant amount of processing and at a peak time both services might not be available.

Services Resource Consumption

There are some services which requires high CPU/Memory consumption, like build systems. So you have to move these services into separate server in order to mitigate the interruption. Its a good idea to use virtualization to service isolation, memory/ process utilization. However You need to make sure to host, processor intensive programs as less as possible. Because any of over processing VMs may lead into total system crash or staled.

Security consideration

Security is a important aspect to consider as I explained in services bundling. Potential suspicious services should not ever run with security essential service. Also you shouldn't distribute critical/ultra important contents among many servers. As a example SSL certificates, keys should not distribute among many servers to enable ssl on different httpd sites. Instead you can use one server with different virtual hosts to use same content.