This blog by Arun Gupta of Coucbase explains how to use Docker Volume Plugins and…
April 11, 2018
Architect’s Corner: How Pyvotal Solutions offered customers a more reliable platform for less money using containers
In today’s Architect’s Corner we speak with Christian Guers, CEO of Pyvotal Solutions. Pyvotal Solutions offers specialized consulting and Cloud services to streamline the operation of their clients and grow their businesses, locally and regionally. They have over 25 years of experience in IT, supporting high-traffic, world-class web sites. Their clients include companies in retail, finance, and construction. When Christian needed to build platform solutions for cost-conscious, but demanding customers, he turned to containers. After solving a few key problems, including fast, reliable multi-writer shared storage, Christian was able to deliver a platform with the same level of reliability and performance using less resources.
Key technologies discussed
Infrastructure – Amazon Web Services
Container runtime – Docker
Orchestration – Rancher
Stateful Services – Postgres, MySQL, WordPress, Magento
Can you tell us a little bit about what your company does?
Pyvotal Solutions is cloud-based infrastructure and platform services company focused on the Latin American market. I started the company a little over four years ago with a partner because we saw a need for companies in the region to adopt cloud and other modern IT practices in order to become more agile, effective, and efficient. Most of the companies that come to us want to expand to other regions and markets, and we help them build out the infrastructure and systems to do that. While we focus mainly on infrastructure and platform services, we partner with application development specialists to provide a complete solution for our customers. For example, we have over 60 e-commerce customers expanding their market reach with Pyvotal. These customers include communications, mobile, and airlines companies.
Tell us about your role at the company?
I am the CEO. But I also have a very strong technology background, so I’m very hands on. I get involved quite a bit in all of the technical aspects of the solutions and the services that we sell. When there’s consulting engagement that needs a little bit more of a deep dive into the technology, I really enjoy participating in that.
How are you using containers at Pyvotal?
The majority of our customers want a complete managed solution for their applications. For an ecommerce site, for example, they don’t want to manage the infrastructure or the CMS. We use containers to easily manage that environment for them.
The reason that we’re using containers is to make sure that we provide our customers with an agile, but cost effective, solution for their needs. There are a lot of companies that come to us for an a fully managed e-commerce or marketing website but they don’t really want to spend a lot of money on it.
As a service provider, it’s more effective to provide that environment via containers than using traditional virtualization because you can provide the same level of reliability and performance using less resources.
So for us, containers are a means of providing a more granular and more manageable environment for customer solutions.
You mentioned containers provided a more cost-effective solution for your customers. Tell us more about where you find the biggest cost savings.
Containers allow us to make better use of the underlying infrastructure. We have several e-commerce sites running on their own server or set of servers. But because traffic is not consistent throughout the day, there are certain times of the day when those resources are underutilized. Traditionally with virtual machines, even in a pay-for-use model, you’re wasting compute resources because they require a dedicated resource (like a vm) per application. Containers are a more efficient use of resources because you don’t just run one application on one server. You now run many containers on a server. So we can be much closer to the demand curve in terms of resources that are being provisioned.
Containers are also more flexible. As demand grows you can add servers. With the traditional cloud-based virtual machines, you try to use the smallest server reasonably possible for an application to run, to lower the cost as much as possible. With a containerized environment, the best approach is to go with bigger-sized machines with more CPU and more memory, and then run more containers on fewer servers. In the end, you end up saving a lot of money this way.
Can you talk a little bit about some of the challenges you had to overcome in order to run stateful services on containers?
A few years ago,when we started playing with Docker, we identified pretty quickly that it’s easy to containerize applications but the management of those containers can be quite a nightmare. So we first started looking for a service that would help us manage the containers and we ended up with Rancher.
Once we had settled on a scheduler, however we noticed that containers provide an excellent means to manage compute resources, like CPU and memory.
But persistent storage management is fairly limited. Which is kind of funny because persistent storage is one of the key elements to any solution.
For persistent storage, we were looking for something that was easy to deploy, easy to manage, easy to integrate via Docker Compose, and of course integrated with Rancher. We looked at different solutions, including Amazon’s EFS (Elastic File System), and Portworx.
We ended up choosing Portworx for persistent storage because it addresses all of those needs, including easy deployment and management. One of the things also we also really like about Portworx is that it provides on-demand snapshots of volumes. We don’t have to stop applications or leave volumes offline in order to be able to take consistent snapshots.
Additionally, Portworx provides us with cloud-based snapshots that we can store in a low cost object storage environment like S3 that we can access in case we need to restore data that’s been lost. This is great for disaster recovery.
Portworx was one of the key elements needed to make sure our Container-as-a-Service offering is viable. We needed to be able to tell our customers, “We have something that you can trust, with high availability, and relatively low cost. And we can provide you with even better service in this container environment than we could using traditional cloud services.”
You mentioned exploring Amazon EFS for persistent container storage. Why didn’t you choose EFS in the end?
We offer cloud-based services that are automatically scalable. This means that we scale out our containers based on load.
Many of our customers’ workloads, especially, CMS workloads like WordPress or Magento require volumes that can be accessed, and written to, by multiple containers at the same time. In effect, when you scale out, you will have more than one container running the same application that has to share the same data. So regardless which container you’re being served by, you’re actually dealing with the same information. The shared aspect of storage was one of the key things that we were trying to address when we were looking at services like EFS. EFS is a great solution, we really like it and use it quite a bit for some applications. But there were two issues with EFS that meant it wasn’t the right solution for containerized WordPress, Magento and other apps that require shared volumes: performance and lack of easy-to-use snapshots.
We benchmarked EFS against Portworx and Portworx was about twice as fast for a typical workload.
We set up a test to replicate as close as possible the same benefits that EFS provides. So we set up the Portworx volumes using a replication factor of three and we found that it was much faster. To be fair, with direct-attached storage without Portworx, you could set up several volumes on the same host and use some type of RAID configuration to replicate it, and the performance would still be pretty much the same as just a single disk. However, if you lose that node, you would could lose your data if the server had an issue, so we didn’t go with that option.
The other thing issue is the lack of easy snapshots. With EFS, there’s no out-of-the-box snapshot feature that allows you to take a snapshot, point it to an S3 bucket, and then if you ever need to restore to from a that snapshot, you have your EFS volume at that time. It’s a lot more complex than that. In addition; it’s complex to set up and manage a backup process for EFS.
You mentioned eCommerce as a primary use case. Do you have any customers that are running traditional database applications as well on your CaaS?
Oh yes. A lot of them. We have a few with Postgres and MySQL. For example, we have one customer that provides monitoring and management of mining truck tires. These are monster trucks that are several stories high. And these tires are very, very expensive. They monitor the entire truck itself with sensors, including the wheels and the tires, and they capture all that information in several databases and run business intelligence on it to help their customers get the most out of those tires. And so in that case, it’s a traditional kind of client-server type of application using MySQL. We do have a mix of customers, not only the website space or e-commerce site, but also in traditional spaces like ERPs using PostgreSQL.
Can you talk about why you decided to run stateful services in containers?
We’re doing a lot of serverless development of applications. In the case for serverless, we do use a lot of stateless applications. In other cases it’s an application that has to be more long-lived. For example, the current ERP systems have to run processes for a long time, and so a stateful environment is more appropriate for them. But there’s there are other applications, like the monitoring of the tires that I mentioned before, that actually is are best served via a stateless environment. So I think it’s a combination of both. And the cool thing about the container world, in combination with other services from Amazon, is that the containerized world allows us to provide a solution or services for both types of customers or and both types of applications.
What advice would you give someone else in your position who is thinking about deploying stateful applications in containers?
For a solutions integrator who wants to build solutions and make use of the containerized world one of the key things to understand is how to manage persistent storage. Right now, Kubernetes, Docker, and Rancher provide a very good management of the containers themselves, but very little in terms of persistent storage. One of the key things is to look for is a solution that will provide persistent storage that is easy to manage and easy to deploy, that doesn’t get in the way of what you’re trying to do. As companies providing services and solutions, it’s important to focus on what we are good at, and you have to partner with companies that have figured out something as critical as storage.
And I think that Portworx is one of those partners that does an excellent job of putting together a solution for persistent storage. That is, like I said, a key element to this whole of the containerized applications world.