Design and Implementation of the clusterf Load Balancer for Docker Clusters

Author

Tero Marttila

Submitted

Thesis submitted for examination for the degree of Master of Science in Technology at Aalto University Department of Communications and Networking,

Espoo 10.10.2016

Thesis supervisor

Prof. Raimo Kantola

Thesis advisor

PhD. Pasi Sarolahti

Seminar Presentation

Presented 07.10.2016 (slides].

Abstract

Relation to a bigger picture

Docker uses the Linux container namespace and cgroup primitives to provide isolated application runtime environments, allowing the distribution of self-contained application images that can be run in the form of Docker containers.

Container platforms provide the infrastructure needed to deploy horizontally scalable container services into the Cloud, including orchestration, networking, service discovery and load balancing.

Purpose

This thesis studies container networking architectures and existing Cloud load balancer implementations to create a design for a scalable load balancer using the Linux IPVS network-level load balancer implementation.

The clusterf load balancer architecture uses a two-level load balancing scheme combining different packet forwarding methods for scalability and compatibility with existing Docker applications.

A distributed load balancer control plane is implemented to provide automatic load balancing for Docker containers.

Research method

The clusterf load balancer is evaluated using a testbed environment, measuring the performance the network-level Linux IPVS implementation.

The scalability of the clusterf load balancer is tested using Equal-Cost Multi-Path (ECMP) routing and IPVS connection synchronization.

Key results

The result is that the network-level Linux IPVS load balancer performs significantly better than the application-level HAProxy load balancer in the same configuration.

The clusterf design allows for horizontal scaling with connection failover between IPVS load balancers.

Practical implications

The current clusterf implementation requires the use of asymmetric routing within a network, such as provided by local Ethernet networks.

Extending the clusterf design to support deployment onto existing Cloud infrastructure platforms with different networking implementations would qualify the clusterf load balancer for use in container platforms.

Thesis

Available on Aalto Doc (PDF, 97+7 pages).

The clusterf Load Balancer

Design

The architecture of the clusterf load balancer is shown in the Figure below.

Implementation

The Go implementation of the clusterf load balancer control plane is available on GitHub:

go get github.com/qmsk/clusterf