How Web Hosting Works

Category: Web Development
 Web hosting is the process involved keeping a website alive. The web as we know it; is a collection of hosts. To host is to store files necessary for a website to function in a publicly accessible fashion. Usually this fashion is the URL (Uniform Resource Locator) or in other words the addresses you type. For example; https://imucheru.com/


The difference between an ordinary computer and a web host is in the size of the computer and the fashion of file access. Ordinary computers are small compared to web-servers which are basically huge computer clusters that can host thousands of websites. Ordinary computers have a user interface for interaction while the servers are navigated using browsers. That being said, if you are rich enough, you can turn a web server into a personal computer; in the case you are desperate enough, you can turn your personal computer into a server.


The Internet is in the ‘cloud’ which is a fancy way of abstracting server location. That is, you can access a service that runs on some server(s) but you just can’t tell where they are located. Information stored on your computer and only accessible to you is ‘local-storage’ like; folders, operating system and multimedia. Storage accessible to you but not in our local machine is called ‘cloud-storage’ like; emails, tweets and statuses you upload.


There are numerous options to achieving a cloud facility should you require one. As an example, I’ll take you through the process of setting up a tiny server accessible to the world, best suited to host a website. That being said, this very set up can be configured to cater for diverse needs. Just like your laptop, the cloud offers limitless possibilities.


The process of setting up a personal server is synonymous to setting up a new computer. For starters, there are fundamentals required for the computer to function. A CPU (Central Processing Unit), some RAM(Random Access Memory), some ROM (Read Only Memory) and the final requirement is to join your machine to the Internet(Networking). That’s all we are going to need for the illustration.


The ROM is your long term storage unit. This is where the website files go the same way you store files on your machine. The RAM is a very short term memory that is specialized to storing the information needed to accomplish the task at hand. This information is retrieved from the ROM. The CPU then takes information from the RAM, processes it and does then either stores back to ROM if the task has been complete or load it back to RAM should there be further processing needed. Networking is finally crucial in exposing this setup to the web.


Just like an ordinary machine, you get to choose the size of the components. According to your specific need, some need to be bigger than others. Making a component larger that it should be bleeds efficiency. You are essentially paying for excesses capacity. So understanding what your website needs is paramount. For example, analytical websites will require more RAM and CPU because of the intensive processing required by the math. A multimedia website will definitely need more ROM and RAM than it does the CPU. 


That is the hardware part. Now in comes the software to manage the hardware. Again, with this, you will need the absolute minimum software needed to run your server’s purpose. Hosting software you don’t need would essentially waste your ROM. Web servers don’t have user interfaces because they are is accessible to the web via browsers. Browsers take care of the access. To learn more about this; visit this article.


To begin with, you need to install an operating system. Because there’s no user interface for the developer to interact with, terminals are used. They are the mono-chromed windows where programmers type witchcraft and the screen fills up with magic. Using a series of commands you’ll instruct the computer to download and install the operating system for your local machine.
 
 Next you will set up a reverse-proxy server. This is a virtual server that essentially is a broker between your application and the internet. If your machine is large enough, you can host several of these and cut costs. 


After that, you need to set up the application server. This is also virtual and it’s primary purpose is to serve your application to the reverse proxy. Each application server can only host one application. You can only have one application server per application. If you need another, you would need to set an additional reverse-proxy server. 


Then we finally sit our application inside the application server. This is where the application will live and function. There’s not much to but it is crucial in providing resources unique to the application. The application server works in tandem with the reverse proxy to get expose our application.


Up to now, our functional server cannot be accessible via a web browser. The reverse proxy server does this for us by listening to a URL. Now this is the networking part. The URL is set up to point to our reverse proxy server and our application is now accessible to the web.


To sum it up; a host is a computer which stores files, processes them by request, stores and avails this information to browsers. A user uses the URL, which in turn points to a reverse proxy server. This server then sends the same over to the application server. The application server then runs the application to process the request which then returns some result up this same chain.


That is how you are reading this article. 
Theme

Choose Theme

Night
Dawn