Now that we’ve talked about the nuts and bolts of IaaS, we can jump in to the next topic, PaaS. If you missed the first part in this series, you can find it here.
Platform as a Service providers make it easy for developers to deploy and manage applications while hiding all the implementation details, like dealing with servers, load balancers, DNS, etc. They more or less remove the need for an ops team, letting devs focus on application deployment. There are many PaaS providers, and one of the most popular is Heroku. The interesting thing about Heroku is that it runs completely on top of AWS and is tied to it. That may be a problem for you if you don’t want to be running in AWS us-east or eu-west. Without IaaS, platforms like Heroku would be much less likely to exist. PaaS providers use IaaS as a very important building block to deliver their service. PaaS was a logical next step in the trend to decrease time from idea conception to deployment, automate processes that used to be done manually, and commoditize specialized systems knowledge; just like the move from dedicated servers to IaaS.
PaaS Is Hard to Build
Being able to abstract away the concept of dealing with servers isn’t easy, there is a lot that goes in to making it happen.
Under the hood of a PaaS there are a few main components:
- Build system that takes your code and compiles it into a ready to run form and stores it somewhere for later usage.
- Application management database that tracks git revisions, build versions, and application meta-data.
- Cluster scheduler that can treat a large group of servers like one big computer, running your built application somewhere on the pool of machines, and maintain checks that replace sick or failing jobs.
- Load balancing that allows traffic to be properly routed both from the internet and between different applications internally.
- DNS automation that sets up records automatically as you create and modify applications.
- And perhaps most importantly — Some form of containerization whether it be freebsd jails, solaris zones, or linux containers, that keep one user of the platform’s applications from stepping on someone else’s.
The first and last points are actually extremely important parts of Docker’s explosive growth. Linux container support has existed in the Linux kernel for some time, but only big companies or PaaS providers had automated their usage. Docker makes dealing with linux containers easy and provides a standardized image format. They made a big part of the PaaS secret sauce free.
That is powerful, because lots of companies are dealing with exploding user bases, new traffic patterns caused by mobile, social, and IoT, and the desire to move from long release cycles to continuous deployment. They are utilizing software oriented archirtectures or microservices. They need to be able to deploy and test new code automatically, and scale up and down as instantly as possible when traffic surges.. The problem is, they don’t have the resources or necessary experience to deliver that functionality to their development team, so they outsource it to a PaaS. Unfortunately when you do that, you’re giving up a lot of control to a black box, spending a ton of money, and essentially making yourself dependent on it. Alternatively, companies reinvent the wheel over and over again or use tools that are hard to maintain, slow, and error prone.
The best case would be to get a PaaS running in your own datacenter or cloud account, where you have full control, and more or your team can get directly involved in deploying their own apps, and you can create a true devops culture. Docker, and the standardization it’s ecosystem has driven are a big step toward making that possible.
Container Hosting Platforms
Ok, ok. So what is a container hosting platform, or Containers as a Service? It’s all the other stuff I mentioned in that list in the previous section, built around the pieces Docker provides. It’s the automated build system, cluster scheduler, load balancing, DNS automation, and service discovery that you need to actually use containers to host complex multi tiered applications. It’s the other pieces of the PaaS, but instead of having janky buildpacks that build your app, now you have Docker images. Images that are easy to build and test locally so you’re sure they will work before you deploy. And now the PaaS users can get the same experience for significantly less money using their own hardware or cloud account. They are no longer limited to the integrations that their particular provider currently supports, and can run and use anything that will build into a Docker image.
In the process, with system like ContainerShip Cloud, you gain the ability to run anywhere, on any cloud or even on bare metal in the same way. You’re no longer stuck trying to build your own solutions to some really hard problems, or getting stuck using a specific provider’s deployment automation tools.
But choosing the right Docker container hosting platform isn’t easy and there are some things you should be aware of and watch out for.
- There are a ton to choose from, so it can be hard to commit to learning one. The good news is that once your applications are Dockerized, you should be able to test each of them easily.
- Using a solution provided by your hosting provider, like Triton or ECS is still locking you to that provider, and making one of the most exciting things about Docker, portability, not a priority.
- Many of the CaaS solutions run the whole management system on their own hardware, and only run an agent that connects back to their API on your servers, so if they go down your server cluster will not function.
- The solutions that allow you to run the full system behind your firewall are complex and have a million moving pieces, and will require a team to manage and upgrade.
- Those that are more simple and do allow you to run the whole thing behind the firewall sometimes make high availbility a low priority.
- You will get rid of your hosting provider lock-in and trade it for Containers as a Service provider lock-in with many of the other most well known CaaS providers. There is no way to run the whole platform including the management system, API, and UI fully on your own hardware without using their SaaS management interface. One you commit to paying you better be able to keep paying.
Should you switch from PaaS to CaaS?
In my opinions the benefits far outweight the drawbacks. I think the real question is, if you’re already using a PaaS provider, should you spend the time to learn docker, and get your whole team into the idea? Should you invest time learning a new container hosting platform?
Undeniably, yes. Containers are not going anywhere. PaaS providers are going to morph into CaaS providers. Don’t resist the container wave, ride it.
- You’re going to cost yourself a lot of money paying PaaS providers, or big web hosting companies that may not be the best place to be hosting your specific app.
For example, a standard 2x Heroku dyno gives you an unspecified amount of CPU and 1GB RAM. If you wanted to run 8 of these it would cost you $400/month.
At DigitalOcean, you can rent a droplet with 4CPUs and 8GB RAM and run 8 0.5CPU and 1GB RAM docker containers for $80/month, (plus a per server cost for your CaaS provider). Saving around $300/month is a lot of money for a lot of companies.
- You’re going to have full root access to the servers running your applications.
That is going to give you the ability to really understand how your application is behaving and performing on a deeper level.
- You will have the power of Docker that you don’t have with your PaaS provider.
Being able to get every developer on your team testing their code locally and then building it, and knowing it will work in production is a massive efficiency boost for the whole team.
You’ll be able to pick the best tool for the job instead of the best available tool that your provider has integrated that sort of does the job.
Thanks for reading this background on the evolution of web hosting from dedicated servers to Container hosting platforms. Hopefully it helped answer some questions and point out some benefits that will drive you to try containers.
Want to learn more about containers and how to use them in production? Click here to subscribe to our mailing list.
Also, check out of official documentation and feel free to leave a comment or contact us with any questions!
Get the latest posts delivered right to your inbox.