Conf42 Chaos Engineering 2025 - Online

- premiere 5PM GMT

Hosting Applications on VPS vs Docker: Key Differences and Best Practices

Video size:

Abstract

In this talk, I’ll compare traditional VPS hosting with Docker’s container-based approach, focusing on key factors like deployment, team productivity, resource efficiency, application management, and scalability. I’ll share how migrating to Docker cut AWS costs by 20% for the Swoo App and explore orchestration tools like Kubernetes for managing containers efficiently. This session will offer practical insights into how Docker can transform your hosting strategy and optimize performance

Summary

Transcript

This transcript was autogenerated. To make changes, submit a PR.
Hello, everyone. This is Vivek Kumar, a senior software engineer at FANG. I am very excited to be here today to talk about something that's crucial for modern application hosting, that is VPS and Docker. We will dive into key differences, how they impact deployment and scalability, and also explore best practices. Plus, I will also share a real world success story about the Sue app and how they optimize their infrastructure. Let's get started. First of all, let me give you a snapshot of what we will cover today. We will compare VPS hosting with Docker container based approach and talk about how Docker can improve deployment, efficiency, team productivity, and resource optimization, and don't worry, I will keep it practical with insight you can actually use sound good. Here is our roadmap for today. So first we will go through the introduction to VPS and Docker key differences and deployment and team productivity. Then we will also discuss about resource efficiency and cost optimization. We will also look for application management and scalability, and we will also walk through practical example of su app migration. Then. We will also touch base on Kubernet, the orchestration tool. We will also talk about the best practices for hosting application and migrating to Docker. Let's start by defining what VPS and Docker actually are. VPS hostings provide a dedicated virtual environment on a shared physical server. You can think of it like a renting an apartment in a big building. You have your own space, but you are still sharing the physical structure with others. It's great for running applications with stable infrastructure needs. With VPS, you get a virtual slash of a physical server. You have dedicated resources like CPU, RAM and storage. It's flexible and gives you control, but it can be resource intensive and scaling is not always straightforward. Now let's talk about Docker. Imagine you or your belongings neatly packed in a container that you can move anywhere that's Docker. Docker takes a different approach. Instead of virtualizing hardware, it allows you to package application and their dependency into lightweight portable container that can run consistently across different environments. This means you can run the same application on your laptop, a test server, or in production without worrying about environment differences. That's why it makes deployments much more consistent and scalable. Basically, containers share the host OS kernel, which makes them lightweight. Here is a quick comparison. If you look at isolation, with VPH, each server has its own full operating system, providing complete isolation from others. This means that if one server crashes or is compromised, it won't affect the other. On the other hand, Docker uses process level isolation, where each container shares the same kernel as the host operating system. While this provides some level of isolation, it's not as robust as having a full OS per server. If you let's look at the resource usage, when it comes to resource usage, VPS requires a full operating system for each instances, which can be heavy. While Docker containers share the host OS, making them lightweight. Now talk about the portability. Portability is a major advantage of docker. With docker you can create a container on one machine and deploy it to another without worrying about compatibility issues. This makes it easy to move applications between environments, such as from Dev to Prod. VPS, on the other hand, requires manual configuration and setup for each server, which can be time consuming and prone to errors. Even for deployment and scaling in Docker are automated, whereas VPS often involves manual effort. Now look at some differences in terms of the boot time, auto scaling, and cost optimization. Imagine being able to deploy your application under a second. With containers, that's not possible because it loads very fast. By using lightweight Dix image, you can get your application up and running quickly without having to wait for a full OS to boot. This is especially important for applications that require fast deployment, such as real time analytics or live updates. One of the biggest challenges with traditional VPS hosting is provisioning the right amount of hardware. Too little and your application may not have enough resources to run smoothly. Too much and you are wasting money on unused resources. With containers, you can provision exactly what you need. When you need it, this not only saves you money, but also improve efficiency and reduces waste. Imagine being able to handle millions of users with ease. With containers, that's not possible. By using this image, You can quickly deploy new containers to meet changing demands, ensuring that your application remains responsive and performant. This is especially important for applications that experience sudden spikes in traffic, such as gaming sites, during live gaming sessions. Let's move to the next slide. Let's talk about deployment and team productivity. With VPS, setting up environments can be time consuming and error prone tasks. Developers have to spend time to manually configure environments, leading to inconsistency between dev and production. But Docker simplifies this by standardizing environments. You get faster onboarding for new team members and smoother CI CD integration. This means your team can spend more time coding and less time dealing with dependent deployment headaches. So basically it improves also the team productivity. Managing application with VPS can be challenging. You often need manual intervention to scale and balance loads. You might need to provision new server Manually to cope with sudden traffic spike Docker especially when combined with orchestration tools like kubernetes offers centralized app management and easier scaling This ensures better stability And performance even under high traffic condition now Now look at the next slide. Let's take A look at this real world example of how containerization can improve efficiency. We are going to explore the case study of Su App migration. The Su App was initially running on 85 EC2 instances to support various services such as search, user management and authentication. As you can see from the architecture diagram on the left, each instance was dedicated to a specific service, which resulted in a lot of wasted of CPU and RAM resources. This is because each instance was provisioned with a fixed amount of resources, regardless of whether they were being fully utilized or not. This approach may have worked when the app was smaller, but as it grew, it became clear that this was not an efficient way to manage resources. The team was facing challenges such as underutilized resources, high costs, and difficulty scaling to meet challenging demands. So what they did? They decided to migrate to Docker and Kubernetes. Let's take a look at new architecture and see how it improves their efficiency. After migrating to Docker and Kubernetes, the Su F team was able to reduce the number of EC2 instances from 85 to 67. While maintaining the same performance as you can see from the updated diagram on the left The new setup allows for more efficient resource allocation and utilization The result of this migration was a 20 percent reduction AWS cost That's a significant improvement in efficiency. By using Container and Kubernetes, the team was able to optimize resource allocation, reduce waste, and improve the scalability. This case study demonstrated the power of containerization in improving efficiency and reducing cost. Now let's talk about what makes all this possible. That is Kubernetes. As we discussed, containers are a powerful way to deploy applications. But as the number of containers grows, managing them can become increasingly complex. That's where orchestration tools like Kubernetes come in. Kubernetes is an open source container orchestration tool. Restaurant platform that automate that deployment, scaling and management of containers. With Kubernete, you can easily manage hundreds or even thousands of container across multiple host, but what really set Kubernetes apart is its ability to autoscale and self heal. It's basically like a traffic controller for your application, ensuring everything runs smoothly. So let's move to the next slide. So what is more preferred, VPS or Docker? The answer depends on several factors, including project management approach, microservice compatibility, web traffic scale, budget, and deployment capability. Both VPS and container orchestration platforms support web and mobile apps using microservices. But containers offer better service, isolation, and scalability. When deciding between VPS and Docker, team must consider infrastructure cost, scaling expenses, and complexity of managing the chosen solution. If you have a simple application with stable traffic, VPS might be enough. But if you need dynamic scaling, Or run a microservice architecture, Docker is the way to go. Think about your project requirements, budget, and a long term goal when making this decision. Industry adoption varies widely. VPS is preferred by web publishers, e commerce websites, and multi domain developers for their web hosting requirements. On the other hand, Docker is preferred by corporate IP deployment in support of web and mobile applications at a scale in datacenter operations through elastic cluster web server networks. Now let's talk about some best practices. For VPS, using configuration management tools like Ansible, Puppet and Monitor resource uses to avoid overflow. Provisioning for Docker use multi stage build to reduce image size and regularly update Docker image for security patches. Don't forget to implement orchestration tools like Kubernetes. If you are thinking about migrating to Docker, here are some useful tips. Start by assessing and reflecting your microservices. To make sure you can build docker or container out of this. Develop a small prototype before going all in to find out any issue early. Use docker compose for testing and multi container application. Integrate with CICD pipeline and train your team on Docker and Kubernetes or whatever tools you are using. Implement monitoring tools like ELK, Prometheus, or you can use any other tools as you prefer. And finally, migrate gradually using a hybrid approach. To wrap up, Docker offers superior efficiency, scalability, and automation compared to traditional VPS solutions. When paired with Kubernetes, managing large scale containerized applications becomes seamless and highly efficient. So let's talk about the key takeaway for today's Docker provides significant advantage over VPS in terms of efficiency, scalability, and team productivity. By migrating to Docker organization can achieve cost reduction while simultaneously enhancing team productivity, making it a powerful choice for modern application deployment and management. We also look at. The real world example today for the sue app case study that proved that magneting to Docker can lead to cost saving and better resource utilization. This demonstrates the real world benefit of adopting Docker and Kubernetes for containerized application management. That's it for me. Thank you so much for your attention. I'm happy to answer any question if you have. Thank you.
...

Vivek Kumar

Software Engineer @ FAANG

Vivek Kumar's LinkedIn account



Join the community!

Learn for free, join the best tech learning community for a price of a pumpkin latte.

Annual
Monthly
Newsletter
$ 0 /mo

Event notifications, weekly newsletter

Delayed access to all content

Immediate access to Keynotes & Panels

Community
$ 8.34 /mo

Immediate access to all content

Courses, quizes & certificates

Community chats

Join the community (7 day free trial)