Secrets of hosting reliability

Hi again! Hope you had a great afternoon! I know I had! Anyways let’s begin! Today we will be talking about the reliability of your hosting server and how to maximize to as much as possible.

sun-flower-696439_640

So what really is meant by “Reliability of your Hosting Service”? Well, it’s nothing more than the amount of Uptime of your Server. Here, uptime is referred to the amount of time the Server is actually accessible to the Users. And opposite to Uptime, we have the term “Downtime” which like you guessed it correct is the amount of time the Server is down or is not accessible to the users. And being a person who is hosting a Web Server, it is very crucial for you to provide a reliable service because even if you are offering tons of processing power and loads of storage but your server is down most of the time, your users will eventually go away. Therefore it is very important that you try and keep your server online for as much time as possible.

Having said that, it is somewhat impossible to have a Server up and running with 100% uptime as there can be unforeseen circumstances or you might have to take your server down for some regular and scheduled maintenance work. Even big Web Hosting providers have a maximum uptime of 99.9%. The remaining time which the server is offline is used for Scheduled maintenance tasks. Now there are large scale professional companies. And if they don’t have a 100% Uptime then it is fairly easy to say that we being home users setting up their servers in their homes also cannot have 100% or even 99.5% Uptime as we will obviously have more problems like Power Outages, Internet Breakdown, Server failure which other big Web Hosting Companies might have taken care off.

But still, we can on our part try to make our Server as reliable as possible. The first step in doing that is to ensure that there are no power outages in your area. If Power Outages do regularly occur then it might be a good idea to get a portable generator or a small scale UPS (Uninterrupted Power Supply). The second step is to ensure that you have a stable and reliable Internet Connection. The next step is to work on your Backup strategies. There must be a clear cut backup system in place which makes a copy of your entire Server at least once a day and saves that on another PC or even to an external hard disk. In case your Server crashes for some reason and your data is lost, you can quickly restore your data from the Backup PC or external storage and get the Server up and running.

Another factor which comes into reliability is the Website’s response time i.e. how fast the website loads and responds. And there are two main factors on which this depends. The first is the distance between the Server and the user. So, suppose if you and your Server is in the United States and a person from Japan is trying to access it then the access time for the person in Japan will be considerably more compared to the access time for users within and around the US. So make sure to ask your clients where a majority of their Users are based. The second factor is the amount of websites hosted. Needless to say, the more load there is on the Server i.e. the more sites there are hosted, the more time it will take to access them. So be sure to put a stop to the number of Websites you’re hosting on your Server.


That’s it for today. I hope you enjoyed this article. See you all next time!

P.S. And the photo is just to attract your attention – I took it last summer in the fields near the university.

Hardware requirements for a web hosting server

Hello everyone! Today we will actually be dealing with the hardware that you will set up in your homes as a Web Hosting server. The process might become complex if you are building a network of servers and making a fully-fledged data center. However, the amount of heat and noise that network would generate would probably make you house inhabitable.

Like I mentioned it before. You can build a server as powerful, as expensive and as big as you want. The technology is saleable and you can keep on adding to your services over time but since you are setting up the server in your home, I am assuming you are not planning on opening a fully-fledged business anytime soon.Itel Xeon

Let’s get to the server part now. There five main components that you need to take care of when putting together a Web Hosting server. Even though, a meager dual core processor with 1GB of Ram would do just fine, but that would not be able to handle an adequate amount of traffic. So, assuming on the basis of the traffic which I receive on my server, you would do just fine with a Quad Core processor or even an Intel i3 or i5 for that matter. However if you really want to get things running then I suggest that you go for Intel Xeon E3-1220 which is what I went with.

It is a quad core Server CPU with 3.1 Ghz clock speed and can be found online for approximately $189. And the motherboard which I selected with this processor was Gibabyte’s GT Z97 which I got a used one for about $190. A new GT Z97 retails for $238 on Ebay.

What’s even more important is the amount of Ram which you will install in your Web Server. 4GB of Ram should be adequate however, if you can afford it, I’d suggest that you go with 8GB of ram as that will secure the server from fears of crashing in case of a large amount of traffic.I went with ECC’s Crucial Server Memory Module of 8GB but a nice alternative is Kingston’s 8GB HyperX Memory. I have read a lot of recommendations online which recommend even 16GB of Ram but in my opinion, that would be an overkill for a small scale home based Web Server.

The next step is the amount of storage. This now depends on the type of websites which you’ll be hosting on your server. Needless to say, the bigger the size of the files are which will be stored on the server, the more storage space will be required. So, you will need to carry out a bit of assessment when deciding on a Hard Disk. This is purely at your discretion. I went with Seagate’s Barracuda 1TB HDD but really any hard disk with a decent RPM such as WD’s Blue 1TB would do.

The second last step is the network connection that will be attached with your server. Needless to say, the more bandwidth you have, the more requests you’ll be able to handle. In my opinion, for the amount of traffic which we’ll be getting on our server, a standard 4Mbps Broadband connection should be adequate.

The last step in completing your server is the Operating System software that will run on your server. A lot of people would recommend that you go with a linux distribution (probably Ubuntu Server) for the sole reason that in addition to being powerful, it is absolutely free. During my personal quest for setting up a server, I went with Windows Server 2012 R2 and I have my reasons for that. I have an entire article dedicated to the debate of Linux vs Windows so you’ll have to wait a bit more for that.

Some of the things which I’ve left are the obvious omissions of a Keyboard, a mouse and a LCD monitor. You can pick them up according to your own preferences.

In the end, we should realize that the server I went with and the server which I am recommending is probably no better than your own personal laptop nowadays. But it does the job in the end. It gives you that platform to learn and deploy your own Web Server and if you have done it with an underpowered Quad Core processor, you can also do it with a mammoth Xeon or Opteron Server. You also cannot afford to put bigger and more powerful servers in your home as that would create a lot of heat and noise and provide discomfort in your home.

However, if you are really keen on building a proper server and opening your own Web Hosting business then that would obviously require better hardware than the ones mentioned above. In addition to a powerful server, you will also need to install a cooling mechanism in your home that will cool down the servers as like mentioned before, servers can and will heat up a lot and generate heat a lot! So in order to cool down the servers and saving them from melting, a proper cooling mechanism should be set in place.

This is it for today. Hope to see you all next week as well! Thank you and good night!

Hosting security: What I learned making my hosting secure

Hello again! Today’s topic is probably one of the most concerns of hosting a Web Server since if you fail to address this concern properly, you will probably end up compromising your sever one way or another. Yes, today we will be talking about the security aspects of Hosting a Server. I too had to secure my server from every possible threats and here’s what I learned in the process:

  1. Whatever you do, use a secure Password: This is probably a given but you’ll be surprised to find out how many people go for easy passwords just because they are easier to remember. I had a friend whose password was “Full Name + year of Birth”. Whatever you do, don’t be as dumb as my friend because if you do, you risk compromising the security of your Server over a petty issue of remembering a password. If you issues in remembering your password, just make a text file with all your passwords in it and secure it with a Master Password and you’re good to go.
  1. Always use a Secure SSH to remotely access your Server: If you regularly or not so regularly access your server remotely through an SSH, then it is probably better to move your SSH Port from 22 to something else as that will deter or at least hinder people with malicious intent because 22 is the default port and a lot of people check for port 22 by default in order to get access to your server.
  1. Disable any Daemons or Services not in use: A Daemon is a background process which allows for connections to your Server and can be exploited by hackers to infiltrate your Server. Scan your Server for all the Daemons and Services which you are not using and disable all of them. An additional measure can be to close every port which you are not using as this can further reduce the chances of an hacker gaining access to your Server from an unmonitored or unused Service or Daemon.
  1. Look after the Server constantly and Continuously: Keep a constant watch on your Server whenever someone installs a new Software or a new Account on your Server or uploads some files on your Server as someone can intentionally or unintentionally install a malicious software, a rootkit, a virus or a backdoor in your Server. Have some good Utility tools installed and constantly check your System for any irregularities which may occur.
  1. Have a Firewall in place: As a final measure, have a firewall in place on your Server. A firewall is a piece of Software which restricts access to every port except for publicly available ports and for ports which have been included in exceptions. So for example if a firewall has been configured to only allow connections to port 80 then a request for port 3306, a MySQL request will be denied automatically.

security

These some of the basic measures will go a long way in securing a server. And its not like implementing any of these measures requires a degree in Computer Science. All you need is an hour on Google and you will be able to implement all of these features easily in no time.
That’s all there is for today. See you all next time!

Making a website hosting server at home : My Experience

Hello everyone! Hope you all are doing okay!

Well lets not waste any more time then. In this post, I will recollect all of the experiences which I had while setting up the Web Hosting Server in my home. As I have mentioned, I am a Computer Science Student and I like to tinker a lot with different kinds of technologies and that’s when I got the idea to set up my own Web Hosting Server. I read around on the internet and looked up the hardware specifications (I have an entire article on how to choose hardware for your Server in case you missed it). In the end, here is the Server Setup that I had:

  • Intel Xeon E3 – 1220 Processor with 3.1Ghz clock speed and 8MB Cache
  • Gigabyte GT 297 Motherboard
  • ECC Crucial Server 8GB Memory Module
  • Seagate Barracuda 1TB Internal Hard Disk
  • 4Mbps Broadband Internet Connection
  • Logitech K400R Wireless Keyboard
  • Logitech M320 Wireless Mouse
  • 20” Acer V203H Widescreen LCD Monitor
  • Operating System of Choice: Windows Server 2012 R2

computer-169974_640

I know I know a lot of you may question my choice of going with Windows Server 2012 R2 instead of any popular distribution of Linux such as Ubuntu Server 14.04.3 LTS. So first of all, in case you missed it, I have written an entire article debating and weighing the pros and cons of both Windows and Linux as Server Operating Systems. And based on those weights only, did I choose to go with Windows. And I reason is that I wanted to get my Server up and running in as little time as possible and I had no prior experience of setting up a Linux Machine. If I had chosen Linux then I would have to spend an ample amount of time first trying to set up a Linux Server and then learn the Command Line interface of Linux in order to get anything decent out of it. On the other hand, Setting up a Windows Server is a fairly easy and straightforward process. Also I am very much used to the interface of Windows since I have been using Windows probably ever since I started using Computers. Therefore, I chose Windows as it was saving me a lot of time. Having said that, there’s no denying the fact that Linux truly is much more stable than Windows Server and is a lot more flexible ONLY and ONLY if you know how to use it. Probably one of my next challenges would be to learn how to set up a Linux Server and then shift the hosting service from Windows to Linux. Though I’m not sure when I’ll actually take up that challenge.

Moving on, so I bought my copy of Windows Server 2012 R2 (read my post about what’s better, Windows or Linux) and no, I did not download a pirated copy off the Internet if that’s what you’re thinking. I assembled the Hardware components, installed the Operating System and the Server came to Life! However, this was just a regular PC. To make it a proper server, I had to install all the necessary tools that would come in use. So that’s what I did and installed all the tools such as an Apache Server (absolutely necessary to run a Web Server), Mysql, FileZilla for setting up an FTP Server, a VPN and other similar range of services.

There were two problems which I faced with the Web Server.

One was that since I lived in a relatively hot and humid area, the server would heat up a lot and therefore crashed sometimes. So to counter that, I installed a proper cooling system. I wanted to save the cost of using the Air Conditioner 24×7 as that would cost me a fortune on electricity bills. So what I did was install a stylish bladeless Dyson fan near my desk as well as an efficient Lasco window fan in the window which worked as an exhaust fan. The entire setup not only got rid of all the heat generated from the server but also made the room feel much more cooler than the remaining parts of the house.

The second problem was that power outages were very common in my locality. However, I didn’t really have to do anything about that as there was a stand by generator installed in my House and the Server would start up automatically in nearly 6-7 seconds after being shut down due to power failure. Yes, that resulted in a downtime but It was very negligible as well as affordable. The last thing which I did to ensure reliability of my Server was to have a low powered PC connected to the Server via a network with Tons of storage whose sole aim would be to store the data files of the Server as backup in case the Server crashed or was breached and all the data was lost.

Also, I did not realize it in the beginning but I should not have put the server on the same power circuit that my kitchen appliances use. I have a habit of eating french fries while working on my project. I cook them at home (btw, I use a here’s the one I have at home) from flash-frozen pre-cut potatoes. So, I set up a bunch to fry and then go to my office to work. Once it is ready and the fryer timer makes a sound, I come back and bring the fries to the office. In the beginning, when my server ran at the same time as the fryer, I often ended up with dead fuses 🙁 So I had to carefully choose a power outlet to plug in my server to avoid such collisions.

Oh well, that were my thoughts went stray. Back to the topic.

Now that my server was up and running, the final phase was to pitch my service out to potential users. Now since I am not a professional Web Hosting Service provider, my best chance at getting Clients was through Free Web Hosting Services with add on packages which were obviously paid. So what I did was set up my website for Web Hosting, made a few packages such as “Free, Bronze, Silver and Gold” and went live with my service.

I did end up making quite a fair amount of money from it and I still do. However to truly get a serious amount of cash out of this, one has to invest a lot of time and energy into this and take it as a business. I didn’t set up a Web Server because I wanted to have a professional service which I could sell for Money. My aim was to learn and that’s I what I did. I learned how to set up a small scale web hosting Server in my home. And now that its been done, I look forward to my next endeavor.

It was nice talking to you all. See you all soon !

Hosting At Home: Pros and Cons

Hi again! Last time was just an introduction to what Web Hosting was. Just to recap, if you have a website which you want to share with the world, or a blog where you want the people to listen to you or are working on an open source project and want the people to work with you in or anything else, you’ll have to host your website on a web server. Now there are two ways to do this. One is to rent out a hosting service who will take care of all your hassles of setting up a server and everything else related to managing a server and all you’ll have to do is pay them a monthly or yearly fees. Or, you can take a step further and host your own server at home. Both the options have their own merits and demerits.

Here are some of the Pros of In house Hosting:

  • You have complete and utter control over the hosting while hosting at home. A slower processor can be replaced, Ram and storage can be increased etc. and the entire specification of the server can be changed if you deem it unfit. Not only that, if you have the server close to you, you can easily make the physical changes yourself without relying on any external person for doing it for you.
  • An even better advantage of having an In house hosting server is the relative ease with which you can update/modify and upgrade your softwares especially updating the Operating System of the server. Doing the same over the Internet to your rented server can be a huge pain. Any changes to the data being hosted or any other tasks related to system administration can be performed easily without having to remotely log in to a server.
  • Any changes you make to your server at home are immediate. You do not have to wait for your server to implement the changes which you request. You can make the changes immediately, view them and approve them if appropriate or change them again if not needed or incorrect.
  • The initial cost of setting up the server can be relatively low depending on whether you already have a computer present or not. Even if some of the components are faulty, you can easily replace the faulty ones. Better than that, with an in house server, you are not answerable whenever there’s a downtime or whenever the server crashes for whatever reason. You are the boss of your own server.

Now let’s look at some of the Cons:

  • A big issue with hosting online is that most ISPs provide a dynamic IP Address to its customers who can change every few days or every few hours. This means that once your IP changes, the visitors to your website won’t be able to access your server until and unless you update the IP against your domain. While many ISPs also provide a static IP Address, this can incur an additional cost as well. The issue of the dynamic IP Address however can be tackled by installing a script in your server which updates your IP address at the DNS Host every time your IP address is updated by the ISP.
  • The speed of the Internet is also a big factor. If you have a Standard 1Mbps DSL connection, it is pretty much sufficient for a website which online receives a few hits per day. But if you have a website which is very popular and very frequently visited, this can greatly affect the speed of the server. The visitors can experience a lag and the server can even crash if more load is put on it than it can sustain.
  • Another factor is that the speed of the internet is not always consistent. You can experience a slower connection at peak times or the connection can go down altogether for a few hours or days if there is a fault in the ISP’s connection lines. This can greatly affect your Website’s performance.
    Any server when enough loads are put on it will create a lot of heat and noise. This is probably one of the biggest factors why people don’t put servers at the homes and server farms are created especially to tackle this problem of noise and heat associated with servers.
  • And the mother of all demerits of hosting at home. Being in charge of a server no easy task. You have to take care of it 24 hours a day, 7 days a week, and 365 days a year. You have to take care of all the hardware failures. You are in charge of updating and modifying all the softwares and are in charge of the security of the server as well. And this is no easy task. If anything goes wrong, you’re the one who’ll get all the blame.

Now hosting at home does have its troubles and problems. But is it worth it? I don’t know. I probably have experienced some of the troubles I have mentioned but I have surely reaped the rewards as well. If you can figure out whether the pros outweigh the cons of in house hosting, wait up for my next post where I will be discussing ways in which money can be made with free hosting.

Stay Tuned!

Windows vs Linux: Which Is Better For a Server

Hello again! So in the last post we left off with a review of the hardware of a server. Granted that it is very important to choose the correct hardware for your server as using under-powered or overpowered hardware will result in either your server crashing or the server being underutilized. But it is all the more important to use the correct Operating System on your server based on your needs. The two major contenders are obviously Windows server and Linux Server with further distributions in Linux and each has their own advantages and disadvantages. So, without further ado, let’s look at some of the advantages of both of these.

Pros and Cons of Windows

Windows is a name which our generation has grown up listening to day in and day out. It has literally become a household name these days. Windows like we all know is developed by Microsoft. Unlike Linux, Windows is much easier to use and maintain. More than 90% of the people already use Windows on their personal laptops. Chances are that a person hasn’t even heard of Linux but uses Windows in their day to day lives. That’s why people are more comfortable with the interface of Windows than that of Linux. If you are a Windows user on your personal laptop or computer, you can easily set up a Windows Server in your Web Server with minimal learning effort. The Installation process of Windows is also much easier and well defined than Linux. You do not have to be an expert in Coding or anything like that in order to Set up Windows. It’s just that easy!

The Support for Windows Server is also much more extensive and organized than that of Linux. Since windows are developed by Microsoft, there is a proper support system in place for any and every queries, bugs problems etc. that occur with Windows Server.

Another factor which plays in favor of Windows Server is the large number of softwares supported by Windows. Nearly every software ever made since the history of Softwares will have a version for Windows when it might not have any kind of support for Linux or Mac OS X. So, you can be rest assured that you will never have software compatibility issues if you’re going with Windows Server. The same cannot be said for Linux unfortunately. Although, Linux tries to minimize the compatibility issue with Wine, compatibility layer software which sits on top of Linux and allows the users to run Windows Applications, the experience is still nowhere near the same as running the same software in a Windows environment.

Also, Linux does not have a very good support for .NET Framework and .ASP so if you are working with Technologies that include .NET and .ASP then you’ll probably have a easier time running those applications and websites on a Windows Server rather than on Linux.

There are obvious downsides to using a Windows Server as well. The first and foremost being that Windows is not free! The license for a copy of Windows Server 2012 R2 can cost upwards of $1000. It might sound a bit silly to consider this as a downside as softwares are usually paid but considering the fact that the Software which competing with Windows Server is absolutely free, this is a major downside of Windows Server.

Since, Windows Server is a proprietary Software, its source code is not available online. Hence, you are stuck with the features that have already been provided. It is not very flexible in that regard.

I could keep going on and on About Windows but I think we should switch to Linux now.

Pros and Cons of Linux Server

As mentioned before, Windows Server is developed by Microsoft. Linux on the other hand is developed by the Open Source Community! Yes! There is no actual company behind Linux but rather it is the entire Open Source community who over time have contributed to Linux and made it what it is today. A free and Open Source Operating System. Unlike Windows, there are a lot of Distributions of Linux. These distributions all have the same fundamental features of the Linux Kernel but have added functions or tuned themselves for specific purposes. For example, Ubuntu is used for general use, open SUSE is used for Servers and then there is centOS which is again very popular with Web Hosts and small businesses.

This brings us to the flexibility of Linux. Since the source code is available online and you can easily tinker around with the source code, you can have any feature or any package installed or added to your Linux Distro (short for distribution)in no time. This makes Linux much more flexible and stable than Windows Server as any issues which are pointed out by the members are quickly resolved by the Open Source Community and the users do not have to wait for monthly updates or patches from a company before their issues can be resolved or patched. This is the reason why Linux is much more stable and does not crash as often as Windows Server. If you have access to the code and you know how to fix it, then you can fix it yourself rather than being on call with tech support all day and wait for your issue to be resolved. Another aspect where Linux is very strong is Security. It is very hard to breach Linux if you know how to secure it properly.

However the downside to having Linux as your server especially since you’re new to Linux is that you’ll need a lot of time in getting used to Linux and its Environment. Installing Linux and setting it up is very hard and while using Linux as a Server, you will be doing most of your work in the terminal which again requires a lot of learning if you need to get something fruitful out of your server. The flexibility of Linux can only be harnessed only if you know how to harness it. Setting up, playing around and fixing Linux is only possible only when you know what you’re doing. That is why Windows is preferable if you don’t want to waste your time in managing Linux.

That was all I could say on the subject. I’ll meet you all next time. Good bye till then!

Update: Another interesting article on the subject: PostgreSQL : Linux VS Windows

What is a Web Hosting Service?

Hi there! And welcome to the first article of this series. Here, I’ll be keeping it fairly simple and tell you what Web Hosting really is! Sounds simple enough right? Let’s begin!

So imagine you have a Website ready and you are just dying to show it to the rest of the world. But, you need to get in on to the internet in order for the world to see it. How you do that is you “Host” your website onto a Computer. By hosting, I mean that you take save your website files on your own Computer, take your IP Address, mask it against a domain name for example www.myhostingwebsite.com and then tell then entire world to access that domain name. So for example, your IP Address is 13.210.3.98 and you already have a domain name which you’ve brought so you will then mask that IP address of your computer against that Domain name and you will tell the entire world that “Hey, here’s my website! Do come and visit at www.myhostingwebsite.com” . Now when a person puts in that Domain name, that domain name is translated into your IP Address and that IP address tells that person the way to access your PC and access the website files saved on your Computer.

Simple enough? Are you still with me?

Alright now that we know what “hosting” a website means, we will go to the problems of hosting a website on your own Computer. See, when you host a website, you are essentially turning your Computer into a server. A service which will continuously listen for requests of the Users and supply them with the needed information. So for example you have a 50 page website and you get about 10 requests per second, you PC will have to respond to it in time so that the users are not kept waiting. Thus a lot of the computing power of your PC will go into servicing the User requests. And since Personal Computers are not really that powerful, this can not only severely degrade the performance of Computer for normal use but can also crash your PC if it is unable to handle all the requests. We hear news all the time that the Servers of an xyz company crashed due to an excessive number of requests. That’s the same this which can happen here but in a much lower scale. The second Problem is that you can have a power failure or a Hardware failure which, if not resolved swiftly can increase the downtime of your website, thus losing customers.

And that is why we have Web Hosting Services. People who host servers for Web hosting and rent out their services to people like us who just not have the time to set up and maintain their own Web Hosting Servers. There are a few problems with renting out a Web Hosting Service but we’ll be talking more on that later on.

I hope you understood what Web Hosting is! If not, then feel free to contact me if you have any queries or just post a comment below and I’ll be happy to reply.

See you all later!