What's the difference between shared hosting, VPS and dedicated hosting?
What are the pros and cons of each option and what should you consider when choosing between shared and dedicated hosting?
Housing makes a good analogy to explain how these relate to one another:
- Dedicated Hosting is the full use of a single server, which is like living in a house on its own block. You can use all of the house and gardens, and can decorate them as you please. You can have people come in and out all day with no real problem, and you can host big parties, too.
- Virtual Private Server, or VPS, is the segregated use of a single server, which is like living in an apartment block. Each apartment is private and has it's own kitchen, bedrooms, living space and you can decorate those, but other things are shared, like plumbing, property access, and gardens. It might start getting annoying for the other residents if you have people coming and going all the time, and your parties can't be as big because you have less room.
- Shared Hosting is the temporary shared use of a single server, which is like living in a hostel. You basically get a bunk and somewhere to store your stuff, and you share all of the living areas, with lots of rules about what you can and can't do. You can't really decorate much, either. The hostel owners will kick you out if you try to have a big party, but they might let one person at a time in with you.
Hopefully, this helps explain the different pricing. Shared hosting is the bottom tier, and is most appropriate for small sites which don't get much traffic. You're only renting a fraction of the server resources, and the server managers can cram as many shared hosters as will fit on the server, being careful that people can still get in and out and there aren't long queues for everything.
Once you're popular enough to start causing trouble for others, want to install unique software (decorate), or just want more space to store your stuff, you can move to a VPS, and can continue growing your business from there. When you outgrow that, you can then move on to a full dedicated server, which is largely the same as VPS except with more processing power, and a bit more privacy.
If your site continues to grow beyond the power of a dedicated host, you'll start looking into things like clustering, load balancing, content delivery networks, and so on, and those are essentially ways of making sure you have enough houses to serve all the parties you're hosting for your visitors.
Something not asked in the question, but quite relevant here is the cloud. The "cloud", is essentially just a nicer sounding word for "a virtual private server that someone else manages". Instead of being called a VPS, though, the servers are called instances. This is because, while you can use them exactly as you would a virtual private server, they are functionally different under the surface to a typical VPS.
The special thing about the cloud is that not all the bits of your server have to be on the same physical machine. A lot of fancy software goes into separating your software from which hardware it uses to run. Using the housing analogy, it's like having your living room in building A, your kitchen in building C, and your bedroom on another campus. If a VPS is an apartment, the cloud would be a University, and your instance is your assigned rooms for the semester.
This system allows the cloud provider to optimize different server clusters for different tasks, such as computation, web delivery, or databasing, as well as increase power efficiency because they can fully utilize a cluster of machines before needing to turn the next one on. Just as you can scale up a small website to busy one, by going from shared hosting up to a dedicated host, you can do the same thing entirely on the cloud by adding more resources, or more servers, as you need them. The upside for going straight to the cloud with new websites is that scaleability is naturally built-in and easy to accomplish. The downside is that the performance of your site is not always great because of the added overhead, so you need to spend more time making sure your sites are well optimized.
Shared Hosting: In this type of hosting, a single server will have many sites hosted. User can get single hosting solution or reseller package for the shared hosting providers. Eventully eveything this will be hosted in the same server and thus server is shared with other hosters. This type of hosting is low cost and good for the starters, but server has limitation on resources like cpu / memory per domain hosted. So need to check terms and conditions before joinning the service.
VPS: is a personal server / or vitual server which will be hosted in a machince which may have more VPS server hosted. In this option, user will have own server so lots of freedom on server management, tweaks and custom settings, which are not possible with share hosting. server resources like cpu / memory will be shared with other VPS user in the same machine.
Dedicated server: User with own dedicated server, which is a single machine with one single server dedicated to user, its is much more similar to vps, but machine resources is not shared with others. So 100% cpu . 100% memory. While in VPS if one of the vps user of the same machine has more cpu constain job, other vps user will have slow performance.
Basically, Shared hosting is where the host has several accounts on the one server, so your website could be hosted on a server with thousands of other accounts. A VPS virtual private server gives you your own server, but that server is hosted within a physical computer that is connected to the internet. A dedicated server is where you rent the entire physical computer from a Datacenter, a Datacentre is a building where the servers are stored and connected to the internet. Renting an entire dedicated server isn't really needed now a days due to Cloud computing, as you can rent Virtual servers with more capaciity then dedicated ones anyway plus you get the advantage of auto scaling and being able to load balance servers, so if one server goes offline you can set the system to automatically provision a new server so your site stays online. All the big retail stores do this. Keep in mind that the word Cloud is used as a buzz word now a days by a lot of providers, when really all they are offering is single servers without the advantages of proper cloud computing.