Using microservices and containers in network automation (original) (raw)

In 2011, Marc Andreessen said, "Software is eating the world," and the quote continues to resonate in the networking industry. Applications and the cloud have given users ubiquitous access to their data anywhere in the world.

With the explosive growth of applications, network engineers are challenged to adapt their enterprise networks. The designs and deployment of software have evolved to meet user demand, and traditional monolithic architecture has its limitations regarding rapid scaling and testing.

Containers and microservices offer a compelling way forward for modern networking.

A look at containers and microservices

A container is a form of OS virtualization that bundles an application with all its necessary files into one runtime environment. It is isolated from the host system. Meanwhile, microservices provide an architectural design for building a distributed application using containers. A microservice breaks applications down into smaller components.

Here is a simple breakdown of the difference between containers and microservices:

Microservices and containers have revolutionized the design and deployment of applications. They have helped shift software development from a monolithic approach to a more modular and scalable one.

The adoption of microservices and containers has also affected network architecture. Distributed architecture now couples services together, enabling them to communicate with each other over the network. Resulting challenges, however, are an increase in network traffic and a need for better network management tools.

While containers have enabled developers to build scalable, lightweight and resilient applications that can be deployed across different environments, they've also led to complex and distributed network architecture.

Implement microservices and containers in network automation workflows

While containers can bring complexity to the network, they can also be used to automate networking applications and functions. Using microservices and containers in network automation brings numerous benefits, including scalability, modularity and ease of deployment.

Below are the steps to implement microservices and containers into network automation workflows.

1. Identify the microservices

Break automation tasks into smaller, independent services. Each service should handle a specific set of functions in the network, including configuration management, logging, monitoring and device discovery.

2. Containerize the microservices

Docker is the most well-known container service, but choose the right option depending on business and application needs. Ensure that each containerized microservice is lightweight and can run in multiple environments.

3. Choose APIs

Establish a set of APIs. These APIs enable the communication between microservices and data exchange. REST or gRPC are viable options for communication.

4. Choose a container orchestration tool

One of the most difficult challenges with containerization is the management of growing containers. Kubernetes can play a huge role here by providing features such as load balancing, service discovery and automated scaling, all of which are crucial for network automation.

5. Implement infrastructure as code

Implement infrastructure as code (IaC) principles to automate the provisioning and configuration of network devices. Network engineers can use a plethora of tools, such as Terraform, Ansible and Puppet, to define and manage network infrastructure in a declarative manner.

6. Adopt DevOps practices

Adopt DevOps practices to enable better collaboration between the development and operations teams. Implement continuous integration/continuous delivery (CI/CD) pipelines to automate the testing, integration and deployment of microservices. These pipelines enable a faster and more reliable release process.

Container orchestration tools and design considerations for microservices

It's crucial to select a container orchestration tool when working with containerized applications. The choice depends on application complexity, scalability requirements, team expertise and existing infrastructure.

Kubernetes is a common choice, due to its comprehensive feature set, community support and use by major cloud providers. Alternatives in the industry include Apache Mesos, Docker Swarm, HashiCorp Nomad and OpenShift.

The network remains the backbone of the digital economy. When designing microservices for networking tasks, network engineers should consider various requirements associated with networking applications. For example, the following factors are important for microservices design:

Keep in mind: This list is not exhaustive.

Best practices for containerized networking

Containerized networking applications and services come with different advantages. Network teams can follow some best practices to enable better performance and usage of resources and performance.

Here are the best practices:

Pros and cons of microservices and containers in networking

No technology is perfect, and the same goes for microservices and containers.

Below are some of the benefits of microservices and containers in network automation:

Below are some of the challenges of microservices and containers in network automation:

Verlaine Muhungu is a self-taught freelance network technician. He was recognized as a Cisco top talent in sub-Saharan Africa during the 2016 NetRiders IT Skills Competition.