Let’s Dockerize VoIP

06 Mar

From Telecom Ramblings

This Industry Viewpoint was contributed by Tyler Cross, software engineer at Bandwidth

As a curious software engineer working at a telecommunications company it was only a matter of time until I started learning about server-side VoIP software like FreeSWITCH, Kamailio / OpenSIPS, and Yate. These projects each have their own configuration language, resource needs, capabilities, and goals.

It is ideal to (actually) test these applications in an environment as close to production as possible. The best scenario would be to test the exact image that is going to be deployed to production. That doesn’t happen very often. In the telecom world, scaling vertically is seen more often than scaling horizontally. Configurations get updated in place and over time become a living organism surrounded by mystery and fear. Only certain people want or are allowed to touch it.

“Configurations get updated in place and over time become a living organism surrounded by mystery and fear.”

That doesn’t sound right. Fortunately, we have a platform called Docker that can help.

Meet Docker

Docker is an open source container virtualization platform. It uses namespaces, cgroups, and a union filesystem to create an isolated environment (container) for an application.

Docker containers are created using an image. The image is basically a template for creating an image. It is composed of multiple layers, that are unioned together when running the container. This is perfect for VoIP software.

The above figure demonstrates image reuse. Every box is an image that depends on those beneath it. These images can be versioned. You can probably see where I’m going with this…

The Benefits

There are many reasons why using Docker makes sense. The most important thing is that it lets system administrators focus on infrastructure and nothing else. All they need to know is that you need to be able to run a container. This reduces dependencies on each other and decreases the time it takes to push out updates.

Speed

Each container shares the same kernel as the host operating system, so there is no overhead of a hypervisor. Resources are allocated as needed, rather than up front. Docker containers start in a second or less.

Repeatability

The way Docker images work and the fact that we can version them has some nice qualities. A container can be created from an image on any machine and it will always be the same. As a result of this, images can be tested locally or in a QA environment.

Packaging

Everything needed to run an application is included in the image. This removes the problem of conflicting versions of libraries on production machines. Customers can run your image on any host that has Docker installed. Docker is compatible with Windows, Linux, and OS X.

Scalability

We can run multiple containers at the same time and Docker will handle setting up networking for us. The great thing about using Docker with SIP-related projects is that all we have to do for a new container is add an SRV record and we are done.

Conclusion

Docker has potential to be a great enabler of innovation in telecommunications. It’s not just for the web. A lot of constraints typically placed on a VoIP platform can be alleviated so that engineers can focus on what they are building. Perhaps the most useful thing is that engineers can run the application locally just as easy as in production. No more magic or updating the same box over and over in place.

The Docker web site has a lot of great information and documentation on their technology. Check it out.

Tyler Cross is a passionate software engineer from eastern North Carolina with a breadth of knowledge to draw on from the web, bioinformatics, and telecommunications. So far during his 2 years at Bandwidth he has worked on teams that gave him exposure to all technical aspects of our products- backend provisioning systems, real-time communications software, networking, and prototype development in the Bandwidth Incubator. In addition to being a techie, he is an avid runner and athlete in general. He is proud to be a Bandwidth employee and live up to all our principles and ideals.

Bandwidth
Bandwidth
dialed-in@bandwidth.com
No Comments

Sorry, the comment form is closed at this time.