Web Hosting
❓ Why do we need web hosting?
We know that websites and files are stored on web servers located in data centres, but if we want to create our own website? Do we need our own data centre with specialised hardware and software? Thankfully, the answer is no and developers can launch websites to the internet using something known as web hosting.
🤔 What is Web Hosting?
Web Hosting is a service where we place our web application and it's files on the hosting company's web server. We are renting the space in return of stable and secure storage. We need not be a company to web host even individuals can rent space too.
Types of Web Hosting
1️⃣ Shared Hosting
- In shared hosting we pay for a location on a web server containing many web hosting accounts with shared hosting.
- This means that we are going to share the processing power, memory, bandwidth with other websites that might slow our website's performance.
- Some companies offer free shared hosting with some limitations that also run advertisements embedded into the webpage.
🧘 Ideal For
- Small website with small number of users.
- Developers can use this as a low cost sandbox environment to practice deploying or hosting personal websites.
2️⃣ Virtual Private Server (VPS)
- A VPS is a virtual server with dedicated processing power, memory and bandwidth resources.
- It will be running on a hardware server with other VPS instances but as the resources are fixed per a VPS instance, the website is unlikely to be impacted by the performance of other VPS instances.
- A VPS instance will be more expensive than shared hosting.
3️⃣ Dedicated Hosting
- In dedicated hosting the hardware server is only dedicated to the user all processing power, bandwidth, memory are only used by the user's website to use.
- This type of hosting is best suited for large websites with high traffic. In this case, the company or individual rents an entire web server from a hosting company. This is suitable for companies hosting larger websites.
- Dedicated Hosting is more expensive than a VPS instance.
4️⃣ Cloud Hosting
- In cloud hosting the website is run in something called as cloud environment which spans across multiple physical and virtual servers.
- If a physical or virtual server fails the website will be running on a different server and stay online.
- The main advantage of cloud hosting is that we can use as many resources as we need without any hardware limitations.
- We pay based on the resource used. For example if a file is transferred from the cloud to a web browser, the used need to pay for bandwidth used for that transfer.
- As there is no limit for bandwidth unlike traditional hosting, it allows to scale the webpage as popularity grows.